From f9ab74b28ce6a0add3a24c57c7c7f9f5fa1dc9d7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 27 Apr 2020 10:15:06 +0200 Subject: [PATCH] fix build with recent GCC --- build/php7/ice.c | 9 ++++++--- build/php7/php_ice.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build/php7/ice.c b/build/php7/ice.c index 304c911d..fb0d45e2 100644 --- a/build/php7/ice.c +++ b/build/php7/ice.c @@ -21,6 +21,9 @@ #include "kernel/fcall.h" #include "kernel/memory.h" +#ifdef ZTS +ZEND_TSRMLS_CACHE_DEFINE() +#endif zend_class_entry *ice_i18n_plural_pluralinterface_ce; @@ -320,9 +323,6 @@ static void php_zephir_init_module_globals(zend_ice_globals *ice_globals TSRMLS_ static PHP_RINIT_FUNCTION(ice) { zend_ice_globals *ice_globals_ptr; -#ifdef ZTS - tsrm_ls = ts_resource(0); -#endif ice_globals_ptr = ZEPHIR_VGLOBAL; php_zephir_init_globals(ice_globals_ptr); @@ -368,6 +368,9 @@ static PHP_MINFO_FUNCTION(ice) static PHP_GINIT_FUNCTION(ice) { +#ifdef ZTS + ZEND_TSRMLS_CACHE_UPDATE(); +#endif php_zephir_init_globals(ice_globals); php_zephir_init_module_globals(ice_globals); } diff --git a/build/php7/php_ice.h b/build/php7/php_ice.h index ee20ead9..20906e49 100644 --- a/build/php7/php_ice.h +++ b/build/php7/php_ice.h @@ -53,7 +53,7 @@ ZEND_EXTERN_MODULE_GLOBALS(ice) #endif #ifdef ZTS - void ***tsrm_ls; + ZEND_TSRMLS_CACHE_EXTERN() #define ZEPHIR_VGLOBAL ((zend_ice_globals *) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(ice_globals_id)]) #else #define ZEPHIR_VGLOBAL &(ice_globals)