blob: 8a830389b9898155600609a5bb9e354387bc4fb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
https://github.com/unbit/uwsgi/commit/6fba62a3ad947b656bb4379f8f903e90c7b01346
From 6fba62a3ad947b656bb4379f8f903e90c7b01346 Mon Sep 17 00:00:00 2001
From: Alexandre Rossi <alexandre.rossi@gmail.com>
Date: Tue, 10 Jan 2023 10:01:05 +0000
Subject: [PATCH] plugins/php: 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.
---
plugins/php/php_plugin.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c
index 9bb8befad..4d3930b82 100644
--- a/plugins/php/php_plugin.c
+++ b/plugins/php/php_plugin.c
@@ -607,7 +607,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;
|