From 9dace534af4629db361d27d80e22cab72c67359d Mon Sep 17 00:00:00 2001 From: CismonX Date: Sat, 8 Sep 2018 13:07:29 +0800 Subject: [PATCH] Fix Windows ZTS build. --- src/collections.c | 8 ++++---- src/php_collections.h | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/collections.c b/src/collections.c index f296c07..23a27af 100644 --- a/src/collections.c +++ b/src/collections.c @@ -4,10 +4,6 @@ // @Author CismonX // -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "php_collections.h" #include @@ -29,6 +25,10 @@ zend_class_entry* collections_pair_ce; ZEND_DECLARE_MODULE_GLOBALS(collections) +#ifdef ZTS +ZEND_TSRMLS_CACHE_DEFINE() +#endif + static zend_always_inline void collection_ce_init() { COLLECTIONS_CE_INIT(collection, "Collection"); diff --git a/src/php_collections.h b/src/php_collections.h index 78ab8a6..b3db96e 100644 --- a/src/php_collections.h +++ b/src/php_collections.h @@ -7,6 +7,10 @@ #ifndef PHP_COLLECTIONS_H #define PHP_COLLECTIONS_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include extern zend_module_entry collections_module_entry;