Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Commit 1c394e1

Browse files
committed
Fix build with php85-beta2
References: - https://wiki.php.net/rfc/remove_disable_classes - php/php-src#12043 CC build/src/nxt_php_sapi-php85.o cc -c -pipe -fPIC -fvisibility=hidden -fno-strict-overflow -funsigned-char -std=gnu11 -O -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fno-strict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -I src -I build/include \ -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DNXT_ZEND_SIGNAL_STARTUP=1 \ -MMD -MF build/src/nxt_php_sapi-php85.dep -MT build/src/nxt_php_sapi-php85.o \ -o build/src/nxt_php_sapi-php85.o src/nxt_php_sapi.c src/nxt_php_sapi.c:714:37: error: no member named 'disable_classes' in 'struct _php_core_globals' 714 | &PG(disable_classes), | ~~~^~~~~~~~~~~~~~~~ /usr/local/include/php/main/php_globals.h:31:30: note: expanded from macro 'PG' 31 | # define PG(v) (core_globals.v) | ~~~~~~~~~~~~ ^ src/nxt_php_sapi.c:715:33: error: use of undeclared identifier 'zend_disable_class' 715 | zend_disable_class); | ^ 2 errors generated. gmake[1]: *** [build/Makefile:2107: build/src/nxt_php_sapi-php85.o] Error 1
1 parent a76c8a7 commit 1c394e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/nxt_php_sapi.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ static nxt_int_t nxt_php_alter_option(nxt_str_t *name, nxt_str_t *value,
9393
#ifdef NXT_PHP8
9494
static void nxt_php_disable_functions(nxt_str_t *str);
9595
#endif
96+
#if (PHP_VERSION_ID < 80500)
9697
static void nxt_php_disable(nxt_task_t *task, const char *type,
9798
nxt_str_t *value, char **ptr, nxt_php_disable_t disable);
99+
#endif
98100

99101
static nxt_int_t nxt_php_dirname(const nxt_str_t *file, nxt_str_t *dir);
100102
static void nxt_php_str_trim_trail(nxt_str_t *str, u_char t);
@@ -710,9 +712,11 @@ nxt_php_set_options(nxt_task_t *task, nxt_conf_value_t *options, int type)
710712
}
711713

712714
if (nxt_str_eq(&name, "disable_classes", 15)) {
715+
#if (PHP_VERSION_ID < 80500)
713716
nxt_php_disable(task, "class", &value,
714717
&PG(disable_classes),
715718
zend_disable_class);
719+
#endif
716720
continue;
717721
}
718722
}
@@ -817,6 +821,8 @@ nxt_php_disable_functions(nxt_str_t *str)
817821
#endif
818822

819823

824+
#if (PHP_VERSION_ID < 80500)
825+
820826
static void
821827
nxt_php_disable(nxt_task_t *task, const char *type, nxt_str_t *value,
822828
char **ptr, nxt_php_disable_t disable)
@@ -868,6 +874,8 @@ nxt_php_disable(nxt_task_t *task, const char *type, nxt_str_t *value,
868874
} while (c != '\0');
869875
}
870876

877+
#endif
878+
871879

872880
static nxt_int_t
873881
nxt_php_dirname(const nxt_str_t *file, nxt_str_t *dir)

0 commit comments

Comments
 (0)