diff options
Diffstat (limited to 'main/php_open_temporary_file.c')
| -rw-r--r-- | main/php_open_temporary_file.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index 260024625b..7fe28cf38b 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -176,7 +176,15 @@ static int php_do_open_temporary_file(const char *path, const char *pfx, char ** /* }}} */ /* Cache the chosen temporary directory. */ -static char* temporary_directory; +static +#ifdef ZTS +#ifdef PHP_WIN32 +__declspec(thread) +#elif defined(__GNUC__) +__thread +#endif +#endif +char* temporary_directory; PHPAPI void php_shutdown_temporary_directory(void) { |
