Skip to content

Commit 140b812

Browse files
committed
PHP: building with PHP 8 (development version).
1 parent d0de6df commit 140b812

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

auto/modules/php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then
100100
`${NXT_PHP_CONFIG} --libs`"
101101

102102
else
103-
NXT_PHP_LIB="-lphp${NXT_PHP_VERSION%%.*}"
103+
if [ $NXT_PHP_MAJOR_VERSION -ge 8 ]; then
104+
NXT_PHP_LIB="-lphp"
105+
else
106+
NXT_PHP_LIB="-lphp${NXT_PHP_VERSION%%.*}"
107+
fi
104108

105109
if [ "$NXT_PHP_LIB_PATH" != "" ]; then
106110
# "php-config --ldflags" does not contain path to libphp, but

src/nxt_php_sapi.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
#define NXT_PHP7 1
3030
#endif
3131

32+
/* PHP 8 */
33+
#ifndef TSRMLS_CC
34+
#define TSRMLS_CC
35+
#define TSRMLS_DC
36+
#define TSRMLS_D void
37+
#define TSRMLS_C
38+
#endif
39+
3240

3341
typedef struct {
3442
nxt_str_t root;

0 commit comments

Comments
 (0)