summaryrefslogtreecommitdiffstats
path: root/uwsgi_fix_php8.patch
blob: 1685a0f60964a9adfd5c4575873d49fd99aa8d47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff -uNr a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py
--- a/plugins/php/uwsgiplugin.py	2022-01-22 22:40:33.783038869 +0100
+++ b/plugins/php/uwsgiplugin.py	2022-01-22 22:41:45.261394898 +0100
@@ -21,7 +21,12 @@ if ld_run_path:
     LDFLAGS.append('-L%s' % ld_run_path)
     os.environ['LD_RUN_PATH'] = ld_run_path
 
-LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version]
+# PHP8 and above does not add the version to the library
+# name
+if int(php_version) < 8:
+    LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version]
+else:
+    LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp']
 
 phplibdir = os.environ.get('UWSGICONFIG_PHPLIBDIR')
 if phplibdir: