summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--APM-pr51.patch27
-rw-r--r--php-pecl-apm.spec4
2 files changed, 31 insertions, 0 deletions
diff --git a/APM-pr51.patch b/APM-pr51.patch
new file mode 100644
index 0000000..ee9c5c8
--- /dev/null
+++ b/APM-pr51.patch
@@ -0,0 +1,27 @@
+From 56d27611af6ee100db07fd07a2fbd76be4341354 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Mon, 13 Feb 2017 16:27:43 +0100
+Subject: [PATCH] Fix #50 build for PHP 5
+
+---
+ backtrace.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/backtrace.c b/backtrace.c
+index 5b0d57c..692a1a5 100644
+--- a/backtrace.c
++++ b/backtrace.c
+@@ -378,11 +378,13 @@ static void append_flat_zval_r(zval *expr TSRMLS_DC, smart_str *trace_str, char
+ }
+
+ switch (Z_TYPE_P(expr)) {
++#if PHP_VERSION_ID >= 70000
+ case IS_REFERENCE:
+ ZVAL_DEREF(expr);
+ smart_str_appendc(trace_str, '&');
+ append_flat_zval_r(expr, trace_str, depth);
+ break;
++#endif
+ case IS_ARRAY:
+ smart_str_appendc(trace_str, '[');
+ #if PHP_VERSION_ID >= 70000
diff --git a/php-pecl-apm.spec b/php-pecl-apm.spec
index f40bd37..c70c8fe 100644
--- a/php-pecl-apm.spec
+++ b/php-pecl-apm.spec
@@ -48,6 +48,8 @@ Source0: http://pecl.php.net/get/%{proj_name}-%{version}.tgz
# Disable the extension and drivers by default
Patch0: %{proj_name}-config.patch
+# See https://github.com/patrickallaert/php-apm/pull/51
+Patch1: %{proj_name}-pr51.patch
License: PHP
Group: Development/Languages
@@ -141,6 +143,7 @@ mv %{proj_name}-%{version} NTS
cd NTS
%patch0 -p0 -b .rpm
+%patch1 -p1 -b .pr51
sed -e 's:/var/php/apm/db:%{_localstatedir}/lib/php/apm/db:' -i apm.ini
: Sanity check, really often broken
@@ -282,6 +285,7 @@ fi
- Update to 2.1.2 (stable)
- open https://github.com/patrickallaert/php-apm/issues/50
PHP 5 build is broken
+- add patch from https://github.com/patrickallaert/php-apm/pull/51
* Thu Dec 1 2016 Remi Collet <remi@fedoraproject.org> - 2.1.1-4
- rebuild with PHP 7.1.0 GA