summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-12-01 17:44:20 +0100
committerRemi Collet <fedora@famillecollet.com>2016-12-01 17:44:20 +0100
commit7f96b4aa63059d7f9d53d0228431b24d7c193dac (patch)
tree6d1e6cd44e3d9a2c7169285693b026b8a21771dd
parent39dd9c32296d4d36b988ac13fbf9042c229cf582 (diff)
php-pecl-env: add patch for 7.1
-rw-r--r--env-pr8.patch22
-rw-r--r--php-pecl-env.spec3
2 files changed, 25 insertions, 0 deletions
diff --git a/env-pr8.patch b/env-pr8.patch
new file mode 100644
index 0000000..6bcae23
--- /dev/null
+++ b/env-pr8.patch
@@ -0,0 +1,22 @@
+From 58552b8035d4b0a72040f0c8aed91ae849172eda Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Thu, 1 Dec 2016 17:40:42 +0100
+Subject: [PATCH] fix segfault with 7.1.0, fix #7
+
+---
+ php7/php_env.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/php7/php_env.c b/php7/php_env.c
+index 22c19b4..b891ba7 100644
+--- a/php7/php_env.c
++++ b/php7/php_env.c
+@@ -37,7 +37,7 @@ void php_env_module_init(HashTable *vars TSRMLS_DC) {
+ fh.filename = ENV_G(file);
+ fh.type = ZEND_HANDLE_FP;
+
+- if (zend_parse_ini_file(&fh, 0, 0 /* ZEND_INI_SCANNER_NORMAL */,
++ if (zend_parse_ini_file(&fh, 1, 0 /* ZEND_INI_SCANNER_NORMAL */,
+ php_env_ini_parser_cb, vars) == FAILURE || ENV_G(parse_err)) {
+ if (ENV_G(parse_err)) {
+ php_error(E_WARNING, "env: parsing '%s' failed", ENV_G(file));
diff --git a/php-pecl-env.spec b/php-pecl-env.spec
index efe1535..caa8152 100644
--- a/php-pecl-env.spec
+++ b/php-pecl-env.spec
@@ -30,6 +30,7 @@ URL: http://pecl.php.net/package/%{pecl_name}
Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
Patch0: %{pecl_name}-pr4.patch
+Patch1: %{pecl_name}-pr8.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# ignore min PHP version 5.5 (as work with 5.4)
@@ -92,6 +93,7 @@ sed -e 's/role="test"/role="src"/' \
cd NTS
%patch0 -p1 -b .pr4
+%patch1 -p1 -b .pr8
# Check upstream version (often broken)
extver=$(sed -n '/#define PHP_ENV_VERSION/{s/.* "//;s/".*$//;p}' php_env.h)
@@ -227,6 +229,7 @@ fi
%changelog
* Thu Dec 1 2016 Remi Collet <remi@fedoraproject.org> - 0.2.1-4
- rebuild with PHP 7.1.0 GA
+- add patch fixing segfault with 7.1
* Wed Sep 14 2016 Remi Collet <remi@fedoraproject.org> - 0.2.1-3
- rebuild for PHP 7.1 new API version