diff options
author | Alexandre Rossi <alexandre.rossi@gmail.com> | 2023-01-10 10:01:05 +0000 |
---|---|---|
committer | Alexandre Rossi <alexandre.rossi@gmail.com> | 2023-01-10 10:01:05 +0000 |
commit | 509a0fdd12870d0bf5b4c1ef7d1f7f1d0fd686b1 (patch) | |
tree | 8c2d53a61375163b2edb7280dc91080c5460a8e2 | |
parent | b5069a6caf419207bb15a0c397e7a3b88bd9e5e5 (diff) | |
download | uwsgi-509a0fdd12870d0bf5b4c1ef7d1f7f1d0fd686b1.tar.gz |
fix build with PHP >= 8.2
from https://raw.githubusercontent.com/php/php-src/PHP-8.2/UPGRADING.INTERNALS:
======================== 5. SAPI changes ======================== * The signature of php_module_startup() has changed from int php_module_startup(sapi_module_struct *sf, zend_module_entry +*additional_modules, uint32_t num_additional_modules) to zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry +*additional_module) as only one additional module was ever provided.
-rw-r--r-- | plugins/php/php_plugin.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c index af797645..b3efa006 100644 --- a/plugins/php/php_plugin.c +++ b/plugins/php/php_plugin.c @@ -617,7 +617,11 @@ static void activate_user_config(const char *filename, const char *doc_root, siz static int php_uwsgi_startup(sapi_module_struct *sapi_module) { +#if ((PHP_MAJOR_VERSION >= 8) && (PHP_MINOR_VERSION >= 2)) + if (php_module_startup(&uwsgi_sapi_module, &uwsgi_module_entry)==FAILURE) { +#else if (php_module_startup(&uwsgi_sapi_module, &uwsgi_module_entry, 1)==FAILURE) { +#endif return FAILURE; } else { return SUCCESS; |