summaryrefslogtreecommitdiff
path: root/ext/mcrypt/mcrypt.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-08-11 12:32:00 +0200
committerAnatol Belski <ab@php.net>2015-08-11 12:32:00 +0200
commitb0893344df1946c842d06a8d2c576abb4f7c78e7 (patch)
tree2993bd04db106d82f55a3348d899f1073995a388 /ext/mcrypt/mcrypt.c
parentf15ec180ade4d6ffc83ca1894ea6b37c2e41299f (diff)
downloadphp-git-b0893344df1946c842d06a8d2c576abb4f7c78e7.tar.gz
integrate static tsrmls cache with ext/mcrypt
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;
}/*}}}*/