diff --git a/ext/kernel/math.c b/ext/kernel/math.c index 50b17e1..0dd995d 100644 --- a/ext/kernel/math.c +++ b/ext/kernel/math.c @@ -16,7 +16,13 @@ #include #include #include +// include php_rand.h for 8.3 and less as it was re/moved in 8.4 +#if PHP_VERSION_ID < 80400 #include +#include +#else +#include +#endif #include "php_ext.h" #include "kernel/main.h" diff --git a/ext/kernel/string.c b/ext/kernel/string.c index 96a49a4..2abe9ee 100644 --- a/ext/kernel/string.c +++ b/ext/kernel/string.c @@ -21,8 +21,14 @@ #include #include +// include php_rand.h for 8.3 and less as it was re/moved in 8.4 +#if PHP_VERSION_ID < 80400 #include #include +#else +#include +#endif + #include #include #include @@ -1223,8 +1229,9 @@ void zephir_crc32(zval *return_value, zval *str) int use_copy = 0; size_t nr; char *p; - php_uint32 crc; - php_uint32 crcinit = 0; + // deprecated php_uint32 and php_int32 typedefs. https://github.com/php/php-src/commit/3e05c86c35e23d97a29f3f1ba0070df73fdf914f + uint32_t crc; + uint32_t crcinit = 0; if (Z_TYPE_P(str) != IS_STRING) { use_copy = zend_make_printable_zval(str, ©);