diff --git a/php/ext/google/protobuf/protobuf.c b/php/ext/google/protobuf/protobuf.c index c635189d4c1..52cdac8e2d7 100644 --- a/php/ext/google/protobuf/protobuf.c +++ b/php/ext/google/protobuf/protobuf.c @@ -39,6 +39,8 @@ static PHP_RSHUTDOWN_FUNCTION(protobuf); static PHP_MINIT_FUNCTION(protobuf); static PHP_MSHUTDOWN_FUNCTION(protobuf); +ZEND_DECLARE_MODULE_GLOBALS(protobuf) + // Global map from upb {msg,enum}defs to wrapper Descriptor/EnumDescriptor // instances. static HashTable* upb_def_to_php_obj_map; diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h index 390e7368b48..059ee55fa12 100644 --- a/php/ext/google/protobuf/protobuf.h +++ b/php/ext/google/protobuf/protobuf.h @@ -689,7 +689,7 @@ ZEND_BEGIN_MODULE_GLOBALS(protobuf) zend_bool keep_descriptor_pool_after_request; ZEND_END_MODULE_GLOBALS(protobuf) -ZEND_DECLARE_MODULE_GLOBALS(protobuf) +ZEND_EXTERN_MODULE_GLOBALS(protobuf) #ifdef ZTS #define PROTOBUF_G(v) TSRMG(protobuf_globals_id, zend_protobuf_globals *, v)