Source: uwsgi
Severity: serious
Tags: patch upstream ftbfs
Justification: fails to build from source (but built successfully in the past)
TSRMLS_* was deprecated in PHP 7 and I believe the macro resolves to
null there. The macro is removed for PHP 8, so uwsgi fails to build
from source when built with that PHP.
-- System Information:
Debian Release: bullseye/sid
APT prefers focal-updates
APT policy: (500, 'focal-updates'), (500, 'focal-security'), (500,
'focal-proposed'), (500, 'focal'), (100, 'focal-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.4.0-70-generic (SMP w/12 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to
en_US.UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) (ignored: LC_ALL set to
en_US.UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Description: Drop TSRMLS_* now obsolete in PHP 8 to fix FTBFS
These C macros were nulled in PHP 7 and removed in PHP 8.
Author: Bryce Harrington
Origin: vendor
Bug:
Bug-:
Forwarded:
Last-Update: 2021-05-28
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/plugins/php/php_plugin.c
+++ b/plugins/php/php_plugin.c
@@ -82,9 +82,9 @@
#ifdef UWSGI_PHP7
-static size_t sapi_uwsgi_ub_write(const char *str, size_t str_length TSRMLS_DC)
+static size_t sapi_uwsgi_ub_write(const char *str, size_t str_length)
#else
-static int sapi_uwsgi_ub_write(const char *str, uint str_length TSRMLS_DC)
+static int sapi_uwsgi_ub_write(const char *str, uint str_length)
#endif
{
struct wsgi_request *wsgi_req = (struct wsgi_request *) SG(server_context);
@@ -97,7 +97,7 @@
return str_length;
}
-static int sapi_uwsgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
+static int sapi_uwsgi_send_headers(sapi_headers_struct *sapi_headers)
{
sapi_header_struct *h;
zend_llist_position pos;
@@ -132,9 +132,9 @@
}
#ifdef UWSGI_PHP7
-static size_t sapi_uwsgi_read_post(char *buffer, size_t count_bytes TSRMLS_DC)
+static size_t sapi_uwsgi_read_post(char *buffer, size_t count_bytes)
#else
-static int sapi_uwsgi_read_post(char *buffer, uint count_bytes TSRMLS_DC)
+static int sapi_uwsgi_read_post(char *buffer, uint count_bytes)
#endif
{
uint read_bytes = 0;
@@ -159,7 +159,7 @@
}
-static char *sapi_uwsgi_read_cookies(TSRMLS_D)
+static char *sapi_uwsgi_read_cookies()
{
uint16_t len = 0;
struct wsgi_request *wsgi_req = (struct wsgi_request *) SG(server_context);
@@ -172,55 +172,55 @@
return NULL;
}
-static void sapi_uwsgi_register_variables(zval *track_vars_array TSRMLS_DC)
+static void sapi_uwsgi_register_variables(zval *track_vars_array)
{
int i;
struct wsgi_request *wsgi_req = (struct wsgi_request *) SG(server_context);
- php_import_environment_variables(track_vars_array TSRMLS_CC);
+ php_import_environment_variables(track_vars_array);
if (uphp.server_software) {
if (!uphp.server_software_len) uphp.server_software_len = strlen(uphp.server_software);
- php_register_variable_safe("SERVER_SOFTWARE", uphp.server_software, uphp.server_software_len, track_vars_array TSRMLS_CC);
+ php_register_variable_safe("SERVER_SOFTWARE", uphp.server_software, uphp.server_software_len, track_vars_array);
}
else {
- php_register_variable_safe("SERVER_SOFTWARE", "uWSGI", 5, track_vars_array TSRMLS_CC);
+ php_register_variable_safe("SERVER_SOFTWARE", "uWSGI", 5, track_vars_array);
}
for (i = 0; i < wsgi_req->var_cnt; i += 2) {
php_register_variable_safe( estrndup(wsgi_req->hvec[i].iov_base, wsgi_req->hvec[i].iov_len),
wsgi_req->hvec[i + 1].iov_base, wsgi_req->hvec[i + 1].iov_len,
- track_vars_array TSRMLS_CC);
+ track_vars_array);
}
- php_register_variable_safe("PATH_INFO", wsgi_req->path_info, wsgi_req->path_info_len, track_vars_array TSRMLS_CC);
+ php_register_variable_safe("PATH_INFO", wsgi_req->path_info, wsgi_req->path_info_len, track_vars_array);
if (wsgi_req->query_string_len > 0) {
- php_register_variable_safe("QUERY_STRING", wsgi_req->query_string, wsgi_req->query_string_len, track_vars_array TSRMLS_CC);
+ php_register_variable_safe("QUERY_STRING", wsgi_req->query_string, wsgi_req->query_string_len, track_vars_array);
}
- php_register_variable_safe("SCRIPT_NAME", wsgi_req->script_name, wsgi_req->script_name_len, track_vars_array TSRMLS_CC);
- php_register_variable_safe("SCRIPT_FILENAME", wsgi_req->file, wsgi_req->file_len, track_vars_array TSRMLS_CC);
+ php_register_variable_safe("SCRIPT_NAME", wsgi_req->script_name, wsgi_req->script_name_len, track_vars_array);
+ php_register_variable_safe("SCRIPT_FILENAME", wsgi_req->file, wsgi_req-