From 8b85382f29288bd4a8400844934241003e24bb4c Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 9 Jul 2024 15:17:19 +0200 Subject: Fix compilation for PHP84+ PHP changed some includes for PHP8.4. This commit also adds php8.4-rc to the CI This fixes #497 and #496 Reported-by: rainerjung --- src/php_snuffleupagus.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/php_snuffleupagus.h') diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index 6e035d4..b4d1be1 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h @@ -42,6 +42,7 @@ #include "ext/standard/php_string.h" #include "ext/standard/php_var.h" #include "ext/session/php_session.h" +#include "ext/hash/php_hash.h" #include "php.h" #include "php_ini.h" #include "rfc1867.h" @@ -58,9 +59,11 @@ #error Snuffleupagus only works with PHP7+. You shouldn't use PHP5 anyway, \ since it's not supported anymore: https://secure.php.net/supported-versions.php #endif + #if PHP_VERSION_ID < 70200 typedef void (*zif_handler)(INTERNAL_FUNCTION_PARAMETERS); #endif + #if PHP_VERSION_ID >= 80000 #define TSRMLS_FETCH() #define TSRMLS_C @@ -70,6 +73,13 @@ typedef void (*zif_handler)(INTERNAL_FUNCTION_PARAMETERS); #endif #endif +#if PHP_VERSION_ID < 80200 +#include "ext/standard/php_rand.h" +#include "ext/standard/php_random.h" +#else +#include "ext/random/php_random.h" +#endif + #define SP_CONFIG_VALID 1 #define SP_CONFIG_INVALID 0 #define SP_CONFIG_NONE -1 -- cgit v1.3