summaryrefslogtreecommitdiff
path: root/ext/bcmath/bcmath.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bcmath/bcmath.c')
-rw-r--r--ext/bcmath/bcmath.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c
index 5c4e8740e4..11f30e47c3 100644
--- a/ext/bcmath/bcmath.c
+++ b/ext/bcmath/bcmath.c
@@ -127,6 +127,9 @@ zend_module_entry bcmath_module_entry = {
};
#ifdef COMPILE_DL_BCMATH
+#ifdef ZTS
+ZEND_TSRMLS_CACHE_DEFINE;
+#endif
ZEND_GET_MODULE(bcmath)
#endif
@@ -140,6 +143,9 @@ PHP_INI_END()
*/
static PHP_GINIT_FUNCTION(bcmath)
{
+#if defined(COMPILE_DL_BCMATH) && defined(ZTS)
+ ZEND_TSRMLS_CACHE_UPDATE;
+#endif
bcmath_globals->bc_precision = 0;
bc_init_numbers(TSRMLS_C);
}