aports/testing/php85-pecl-runkit7/fix-build85.patch
2025-12-30 21:14:13 +00:00

33 lines
1.0 KiB
Diff

diff --git a/runkit_constants.c b/runkit_constants.c
index 6719be1..7a1c054 100644
--- a/runkit_constants.c
+++ b/runkit_constants.c
@@ -408,7 +408,11 @@ static int php_runkit_global_constant_add(zend_string *constname, zval *value)
c.name = constname;
ZEND_CONSTANT_SET_FLAGS(&c, CONST_CS, PHP_USER_CONSTANT);
+#if PHP_VERSION_ID >= 80500
+ return zend_register_constant(&c) ? SUCCESS : FAILURE;
+#else
return zend_register_constant(&c);
+#endif
}
/* }}} */
diff --git a/runkit_functions.c b/runkit_functions.c
index 17f5f67..ad738b7 100644
--- a/runkit_functions.c
+++ b/runkit_functions.c
@@ -364,7 +364,11 @@ static void php_runkit_arginfo_type_addref(zend_arg_info *arginfo)
#else
zend_type type = arginfo->type;
if (ZEND_TYPE_HAS_LIST(type)) {
+#if PHP_VERSION_ID >= 80500
+ const zend_type *atomic_type;
+#else
zend_type *atomic_type;
+#endif
zend_type_list *type_list = ZEND_TYPE_LIST(type);
size_t size_in_bytes = ZEND_TYPE_LIST_SIZE(type_list->num_types);
zend_type_list *new_type_list = emalloc(size_in_bytes);