summaryrefslogtreecommitdiff
path: root/ext/exif/exif.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/exif/exif.c')
-rw-r--r--ext/exif/exif.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index 06e1dae41a..5d00672c5c 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -156,7 +156,10 @@ ZEND_END_MODULE_GLOBALS(exif)
ZEND_DECLARE_MODULE_GLOBALS(exif)
#ifdef ZTS
-#define EXIF_G(v) TSRMG(exif_globals_id, zend_exif_globals *, v)
+#define EXIF_G(v) ZEND_TSRMG(exif_globals_id, zend_exif_globals *, v)
+#ifdef COMPILE_DL_EXIF
+ZEND_TSRMLS_CACHE_DEFINE;
+#endif
#else
#define EXIF_G(v) (exif_globals.v)
#endif
@@ -208,6 +211,9 @@ PHP_INI_END()
*/
static PHP_GINIT_FUNCTION(exif)
{
+#if defined(COMPILE_DL_EXIF) && defined(ZTS)
+ ZEND_TSRMLS_CACHE_UPDATE;
+#endif
exif_globals->encode_unicode = NULL;
exif_globals->decode_unicode_be = NULL;
exif_globals->decode_unicode_le = NULL;