Skip to content

Commit 090f4fa

Browse files
authored
Merge pull request #2744 from xrmx/backports-2031
Backports for 2.0.31
2 parents 129cf47 + 814426f commit 090f4fa

File tree

8 files changed

+26
-18
lines changed

8 files changed

+26
-18
lines changed

plugins/airbrake/uwsgiplugin.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
NAME='airbrake'
44

5-
CFLAGS = [spcall('xml2-config --cflags')]
5+
CFLAGS = [spcall('pkg-config --cflags libxml-2.0')]
66
LDFLAGS = []
7-
LIBS = ['-lcurl', spcall('xml2-config --libs')]
7+
LIBS = [
8+
'-lcurl',
9+
spcall('pkg-config --libs libxml-2.0')
10+
]
811
GCC_LIST = ['airbrake_plugin']
912

plugins/jvm/uwsgiplugin.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,18 @@
4848
break
4949

5050
try:
51-
JVM_INCPATH = ['-I"' + os.environ['UWSGICONFIG_JVM_INCPATH'] + '"']
52-
except:
51+
JVM_INCPATH = ['-I' + os.environ['UWSGICONFIG_JVM_INCPATH']]
52+
except KeyError:
5353
pass
5454

5555
try:
56-
JVM_LIBPATH = ['-L"' + os.environ['UWSGICONFIG_JVM_LIBPATH'] + '"']
57-
except:
56+
JVM_INCPATH = [os.environ['UWSGICONFIG_JVM_INCLUDES']]
57+
except KeyError:
58+
pass
59+
60+
try:
61+
JVM_LIBPATH = ['-L' + os.environ['UWSGICONFIG_JVM_LIBPATH']]
62+
except KeyError:
5863
pass
5964

6065
if not JVM_INCPATH or not JVM_LIBPATH:

plugins/php/session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ PS_READ_FUNC(uwsgi) {
1414
uint64_t valsize = 0;
1515
char *value = uwsgi_cache_magic_get(key->val, key->len , &valsize, NULL, cache);
1616
if (!value) {
17-
*val = STR_EMPTY_ALLOC();
17+
*val = ZSTR_EMPTY_ALLOC();
1818
return SUCCESS;
1919
}
2020
*val = zend_string_init(value, valsize, 0);

plugins/php/uwsgiplugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
# PHP8 and above does not add the version to the library
2525
# name
2626
if int(php_version) < 8:
27-
LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version]
27+
LIBS = ['-lphp' + php_version]
2828
else:
29-
LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp']
29+
LIBS = ['-lphp']
3030

3131
phplibdir = os.environ.get('UWSGICONFIG_PHPLIBDIR')
3232
if phplibdir:

plugins/pty/pty.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static void uwsgi_pty_init() {
259259

260260
}
261261

262-
static void uwsgi_pty_winch() {
262+
static void uwsgi_pty_winch(int sig) {
263263
// 2 uwsgi packets
264264
char uwsgi_pkt[8];
265265
#ifdef TIOCGWINSZ
@@ -309,7 +309,7 @@ static int uwsgi_pty_client() {
309309
if (upty.uremote) {
310310
signal(SIGWINCH, uwsgi_pty_winch);
311311
// send current terminal size
312-
uwsgi_pty_winch();
312+
uwsgi_pty_winch(SIGWINCH);
313313
}
314314

315315
upty.queue = event_queue_init();

plugins/tuntap/tuntap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ void uwsgi_tuntap_router_loop(int id, void *arg) {
409409
}
410410
}
411411

412-
static void uwsgi_tuntap_router() {
412+
static void uwsgi_tuntap_router(int (*start)(void *), char **argv) {
413413

414414
if (!utt.routers) return;
415415

plugins/webdav/uwsgiplugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
NAME = 'webdav'
44

55
CFLAGS = ['-Wno-deprecated-declarations']
6-
CFLAGS += os.popen('xml2-config --cflags').read().rstrip().split()
6+
CFLAGS += os.popen('pkg-config --cflags libxml-2.0').read().rstrip().split()
77
LDFLAGS = []
8-
LIBS = os.popen('xml2-config --libs').read().rstrip().split()
8+
LIBS = os.popen('pkg-config --libs libxml-2.0').read().rstrip().split()
99

1010
GCC_LIST = ['webdav']

uwsgiconfig.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,10 +1315,10 @@ def get_gcll(self):
13151315

13161316
if self.get('xml'):
13171317
if self.get('xml') == 'auto':
1318-
xmlconf = spcall('xml2-config --libs')
1318+
xmlconf = spcall('pkg-config --libs libxml-2.0')
13191319
if xmlconf and uwsgi_os != 'Darwin':
13201320
self.libs.append(xmlconf)
1321-
xmlconf = spcall("xml2-config --cflags")
1321+
xmlconf = spcall("pkg-config --cflags libxml-2.0")
13221322
self.cflags.append(xmlconf)
13231323
self.cflags.append("-DUWSGI_XML -DUWSGI_XML_LIBXML2")
13241324
self.gcc_list.append('core/xmlconf')
@@ -1329,13 +1329,13 @@ def get_gcll(self):
13291329
self.gcc_list.append('core/xmlconf')
13301330
report['xml'] = 'expat'
13311331
elif self.get('xml') == 'libxml2':
1332-
xmlconf = spcall('xml2-config --libs')
1332+
xmlconf = spcall('pkg-config --libs libxml-2.0')
13331333
if xmlconf is None:
13341334
print("*** libxml2 headers unavailable. uWSGI build is interrupted. You have to install libxml2 development package or use libexpat or disable XML")
13351335
sys.exit(1)
13361336
else:
13371337
self.libs.append(xmlconf)
1338-
xmlconf = spcall("xml2-config --cflags")
1338+
xmlconf = spcall("pkg-config --cflags libxml-2.0")
13391339
if xmlconf is None:
13401340
print("*** libxml2 headers unavailable. uWSGI build is interrupted. You have to install libxml2 development package or use libexpat or disable XML")
13411341
sys.exit(1)

0 commit comments

Comments
 (0)