summaryrefslogtreecommitdiff
path: root/ext/mcrypt/mcrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mcrypt/mcrypt.c')
-rw-r--r--ext/mcrypt/mcrypt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index ea26e48b59..bdb119fd41 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -272,6 +272,9 @@ zend_module_entry mcrypt_module_entry = {
};
#ifdef COMPILE_DL_MCRYPT
+#ifdef ZTS
+ZEND_TSRMLS_CACHE_DEFINE();
+#endif
ZEND_GET_MODULE(mcrypt)
#endif
@@ -350,6 +353,9 @@ static void php_mcrypt_module_dtor(zend_resource *rsrc) /* {{{ */
static PHP_GINIT_FUNCTION(mcrypt)
{/*{{{*/
+#if defined(COMPILE_DL_MCRYPT) && defined(ZTS)
+ ZEND_TSRMLS_CACHE_UPDATE();
+#endif
mcrypt_globals->fd[RANDOM] = -1;
mcrypt_globals->fd[URANDOM] = -1;
}/*}}}*/