summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-5.6.30-dtrace.patch63
1 files changed, 62 insertions, 1 deletions
diff --git a/php-5.6.30-dtrace.patch b/php-5.6.30-dtrace.patch
index 7f9e5a4..591a337 100644
--- a/php-5.6.30-dtrace.patch
+++ b/php-5.6.30-dtrace.patch
@@ -1,4 +1,5 @@
-Backported from PHP 7 for PHP 5 by Remi
+Backported from PHP 7 for PHP 5 by Remi, from:
+
From 0c78fe4bb55a9d39afc79cbcbadb9a273f2ec2ef Mon Sep 17 00:00:00 2001
From: Dmitry Stogov <dmitry@zend.com>
@@ -42,3 +43,63 @@ index d036152..87cdead 100644
--
2.1.4
+From f81b7df618750977b9d17f3443d2cb0d74529f50 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Fri, 20 Jan 2017 17:45:15 +0100
+Subject: [PATCH] Fixed bug #73965 DTrace reported as enabled when disabled
+
+---
+ Zend/zend.c | 2 ++
+ Zend/zend.h | 2 ++
+ ext/standard/info.c | 2 +-
+ 3 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/Zend/zend.c b/Zend/zend.c
+index 2a47e92..22a92a6 100644
+--- a/Zend/zend.c
++++ b/Zend/zend.c
+@@ -122,6 +122,7 @@
+ #endif
+
+ ZEND_API zend_utility_values zend_uv;
++ZEND_API zend_bool zend_dtrace_enabled;
+
+ ZEND_API zval zval_used_for_init; /* True global variable */
+
+@@ -686,6 +687,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
+ char *tmp = getenv("USE_ZEND_DTRACE");
+
+ if (tmp && zend_atoi(tmp, 0)) {
++ zend_dtrace_enabled = 1;
+ zend_compile_file = dtrace_compile_file;
+ zend_execute_ex = dtrace_execute_ex;
+ zend_execute_internal = dtrace_execute_internal;
+diff --git a/Zend/zend.h b/Zend/zend.h
+index 141573f..bb9866d 100644
+--- a/Zend/zend.h
++++ b/Zend/zend.h
+@@ -718,6 +718,8 @@ extern ZEND_API zend_class_entry *zend_standard_class_def;
+ extern ZEND_API zend_utility_values zend_uv;
+ extern ZEND_API zval zval_used_for_init;
+
++/* If DTrace is available and enabled */
++extern ZEND_API zend_bool zend_dtrace_enabled;
+ END_EXTERN_C()
+
+ #define ZEND_UV(name) (zend_uv.name)
+diff --git a/ext/standard/info.c b/ext/standard/info.c
+index fa19179..6b06f02 100644
+--- a/ext/standard/info.c
++++ b/ext/standard/info.c
+@@ -1019,7 +1019,7 @@ PHPAPI void php_print_info(int flag)
+ #endif
+
+ #if HAVE_DTRACE
+- php_info_print_table_row(2, "DTrace Support", "enabled" );
++ php_info_print_table_row(2, "DTrace Support", (zend_dtrace_enabled ? "enabled" : "available, disabled"));
+ #else
+ php_info_print_table_row(2, "DTrace Support", "disabled" );
+ #endif
+--
+2.1.4
+