gentoo-full-overlay/dev-php/suhosin/files/suhosin-0.9.33-fix-ZTS-compile-problem.patch

54 lines
1.6 KiB
Diff

From af51a7f576f0cec1d2c94b9bbb3dfb46dd466a66 Mon Sep 17 00:00:00 2001
From: Stefan Esser <stefan@nopiracy.de>
Date: Sun, 12 Feb 2012 10:47:10 +0100
Subject: [PATCH] Fix ZTS compile problem
---
php_suhosin.h | 2 +-
post_handler.c | 2 +-
suhosin.c | 4 +++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/php_suhosin.h b/php_suhosin.h
index 7d0a286..c3491d0 100644
--- a/php_suhosin.h
+++ b/php_suhosin.h
@@ -308,7 +308,7 @@
char *suhosin_cookie_decryptor(TSRMLS_D);
char *suhosin_getenv(char *name, size_t name_len TSRMLS_DC);
void suhosin_hook_post_handlers(TSRMLS_D);
-void suhosin_unhook_post_handlers();
+void suhosin_unhook_post_handlers(TSRMLS_D);
void suhosin_hook_register_server_variables();
void suhosin_hook_header_handler();
void suhosin_unhook_header_handler();
diff --git a/post_handler.c b/post_handler.c
index b405ae2..96f4b4a 100644
--- a/post_handler.c
+++ b/post_handler.c
@@ -162,7 +162,7 @@ void suhosin_hook_post_handlers(TSRMLS_D)
ini_entry->on_modify = suhosin_OnUpdate_mbstring_encoding_translation;
}
-void suhosin_unhook_post_handlers()
+void suhosin_unhook_post_handlers(TSRMLS_D)
{
zend_ini_entry *ini_entry;
diff --git a/suhosin.c b/suhosin.c
index 9829896..01f987c 100644
--- a/suhosin.c
+++ b/suhosin.c
@@ -189,9 +189,11 @@ static int suhosin_module_startup(zend_extension *extension)
static void suhosin_shutdown(zend_extension *extension)
{
+ TSRMLS_FETCH();
+
suhosin_unhook_execute();
suhosin_unhook_header_handler();
- suhosin_unhook_post_handlers();
+ suhosin_unhook_post_handlers(TSRMLS_C);
if (ze != NULL) {
ze->startup = orig_module_startup;