diff --git a/plugins/airbrake/uwsgiplugin.py b/plugins/airbrake/uwsgiplugin.py index 10db6fc190..43b475c59d 100644 --- a/plugins/airbrake/uwsgiplugin.py +++ b/plugins/airbrake/uwsgiplugin.py @@ -2,8 +2,11 @@ NAME='airbrake' -CFLAGS = [spcall('xml2-config --cflags')] +CFLAGS = [spcall('pkg-config --cflags libxml-2.0')] LDFLAGS = [] -LIBS = ['-lcurl', spcall('xml2-config --libs')] +LIBS = [ + '-lcurl', + spcall('pkg-config --libs libxml-2.0') +] GCC_LIST = ['airbrake_plugin'] diff --git a/plugins/jvm/uwsgiplugin.py b/plugins/jvm/uwsgiplugin.py index 23f7da8ff7..657c96357c 100644 --- a/plugins/jvm/uwsgiplugin.py +++ b/plugins/jvm/uwsgiplugin.py @@ -48,13 +48,18 @@ break try: - JVM_INCPATH = ['-I"' + os.environ['UWSGICONFIG_JVM_INCPATH'] + '"'] -except: + JVM_INCPATH = ['-I' + os.environ['UWSGICONFIG_JVM_INCPATH']] +except KeyError: pass try: - JVM_LIBPATH = ['-L"' + os.environ['UWSGICONFIG_JVM_LIBPATH'] + '"'] -except: + JVM_INCPATH = [os.environ['UWSGICONFIG_JVM_INCLUDES']] +except KeyError: + pass + +try: + JVM_LIBPATH = ['-L' + os.environ['UWSGICONFIG_JVM_LIBPATH']] +except KeyError: pass if not JVM_INCPATH or not JVM_LIBPATH: diff --git a/plugins/php/session.c b/plugins/php/session.c index cce0698559..1e19f8bedd 100644 --- a/plugins/php/session.c +++ b/plugins/php/session.c @@ -14,7 +14,7 @@ PS_READ_FUNC(uwsgi) { uint64_t valsize = 0; char *value = uwsgi_cache_magic_get(key->val, key->len , &valsize, NULL, cache); if (!value) { - *val = STR_EMPTY_ALLOC(); + *val = ZSTR_EMPTY_ALLOC(); return SUCCESS; } *val = zend_string_init(value, valsize, 0); diff --git a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py index 492926023d..9fc09188a7 100644 --- a/plugins/php/uwsgiplugin.py +++ b/plugins/php/uwsgiplugin.py @@ -24,9 +24,9 @@ # 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] + LIBS = ['-lphp' + php_version] else: - LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp'] + LIBS = ['-lphp'] phplibdir = os.environ.get('UWSGICONFIG_PHPLIBDIR') if phplibdir: diff --git a/plugins/pty/pty.c b/plugins/pty/pty.c index aa19563d74..68617f31c4 100644 --- a/plugins/pty/pty.c +++ b/plugins/pty/pty.c @@ -259,7 +259,7 @@ static void uwsgi_pty_init() { } -static void uwsgi_pty_winch() { +static void uwsgi_pty_winch(int sig) { // 2 uwsgi packets char uwsgi_pkt[8]; #ifdef TIOCGWINSZ @@ -309,7 +309,7 @@ static int uwsgi_pty_client() { if (upty.uremote) { signal(SIGWINCH, uwsgi_pty_winch); // send current terminal size - uwsgi_pty_winch(); + uwsgi_pty_winch(SIGWINCH); } upty.queue = event_queue_init(); diff --git a/plugins/tuntap/tuntap.c b/plugins/tuntap/tuntap.c index a05db3814b..067a550563 100644 --- a/plugins/tuntap/tuntap.c +++ b/plugins/tuntap/tuntap.c @@ -409,7 +409,7 @@ void uwsgi_tuntap_router_loop(int id, void *arg) { } } -static void uwsgi_tuntap_router() { +static void uwsgi_tuntap_router(int (*start)(void *), char **argv) { if (!utt.routers) return; diff --git a/plugins/webdav/uwsgiplugin.py b/plugins/webdav/uwsgiplugin.py index b5395604f7..70648045fb 100644 --- a/plugins/webdav/uwsgiplugin.py +++ b/plugins/webdav/uwsgiplugin.py @@ -3,8 +3,8 @@ NAME = 'webdav' CFLAGS = ['-Wno-deprecated-declarations'] -CFLAGS += os.popen('xml2-config --cflags').read().rstrip().split() +CFLAGS += os.popen('pkg-config --cflags libxml-2.0').read().rstrip().split() LDFLAGS = [] -LIBS = os.popen('xml2-config --libs').read().rstrip().split() +LIBS = os.popen('pkg-config --libs libxml-2.0').read().rstrip().split() GCC_LIST = ['webdav'] diff --git a/uwsgiconfig.py b/uwsgiconfig.py index d702c996bf..9c77900d0d 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -1315,10 +1315,10 @@ def get_gcll(self): if self.get('xml'): if self.get('xml') == 'auto': - xmlconf = spcall('xml2-config --libs') + xmlconf = spcall('pkg-config --libs libxml-2.0') if xmlconf and uwsgi_os != 'Darwin': self.libs.append(xmlconf) - xmlconf = spcall("xml2-config --cflags") + xmlconf = spcall("pkg-config --cflags libxml-2.0") self.cflags.append(xmlconf) self.cflags.append("-DUWSGI_XML -DUWSGI_XML_LIBXML2") self.gcc_list.append('core/xmlconf') @@ -1329,13 +1329,13 @@ def get_gcll(self): self.gcc_list.append('core/xmlconf') report['xml'] = 'expat' elif self.get('xml') == 'libxml2': - xmlconf = spcall('xml2-config --libs') + xmlconf = spcall('pkg-config --libs libxml-2.0') if xmlconf is None: print("*** libxml2 headers unavailable. uWSGI build is interrupted. You have to install libxml2 development package or use libexpat or disable XML") sys.exit(1) else: self.libs.append(xmlconf) - xmlconf = spcall("xml2-config --cflags") + xmlconf = spcall("pkg-config --cflags libxml-2.0") if xmlconf is None: print("*** libxml2 headers unavailable. uWSGI build is interrupted. You have to install libxml2 development package or use libexpat or disable XML") sys.exit(1)