Skip to content

Commit fd28a35

Browse files
authored
PHPC-2287: Require PHP 8.1.8+ for -Wstrict-prototypes dev flag (#1466)
This dev flag was originally introduced in b83ab98, but did not account for conflicts within headers of earlier PHP versions.
1 parent 3f39b77 commit fd28a35

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

config.m4

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ if test "$PHP_MONGODB" != "no"; then
8080
AX_CHECK_COMPILE_FLAG(-Wno-unused-parameter, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-unused-parameter" ,, -Werror)
8181
AX_CHECK_COMPILE_FLAG(-Wno-unused-but-set-variable, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-unused-but-set-variable" ,, -Werror)
8282
AX_CHECK_COMPILE_FLAG(-Wno-missing-field-initializers, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-missing-field-initializers",, -Werror)
83-
AX_CHECK_COMPILE_FLAG(-Wstrict-prototypes, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wstrict-prototypes" ,, -Werror)
83+
84+
if test "$PHP_MONGODB_PHP_VERSION_ID" -ge "80108"; then
85+
AX_CHECK_COMPILE_FLAG(-Wstrict-prototypes, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wstrict-prototypes",, -Werror)
86+
fi
8487

8588
MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS"
8689
STD_CFLAGS="-g -O0 -Wall"

0 commit comments

Comments
 (0)