summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-06-26 17:50:42 +0200
committerRemi Collet <remi@remirepo.net>2018-06-26 17:50:42 +0200
commita967ec1ab12f53031cf393684b2faa888afd68b6 (patch)
tree995cc54c8ff95cc03f5d178500e59ff13a1860ca
parent3a580096baeb46c5bd3bf3369c41fac92c2973b8 (diff)
add upstream patches for PHP 7.3
-rw-r--r--377d576a6e68def5708cf1ffcd3c233c4dddf356.patch22
-rw-r--r--512f733beac73f37ba4acbcf730ebc6c6de849b6.patch24
-rw-r--r--php-pecl-http.spec10
3 files changed, 55 insertions, 1 deletions
diff --git a/377d576a6e68def5708cf1ffcd3c233c4dddf356.patch b/377d576a6e68def5708cf1ffcd3c233c4dddf356.patch
new file mode 100644
index 0000000..425c8b9
--- /dev/null
+++ b/377d576a6e68def5708cf1ffcd3c233c4dddf356.patch
@@ -0,0 +1,22 @@
+From 377d576a6e68def5708cf1ffcd3c233c4dddf356 Mon Sep 17 00:00:00 2001
+From: Michael Wallner <mike@php.net>
+Date: Tue, 26 Jun 2018 17:19:43 +0200
+Subject: [PATCH] fix shutdown crash with 7.3/master
+
+---
+ src/php_http_options.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/php_http_options.c b/src/php_http_options.c
+index d4be512..4cb6ed3 100644
+--- a/src/php_http_options.c
++++ b/src/php_http_options.c
+@@ -16,7 +16,7 @@ static void php_http_options_hash_dtor(zval *pData)
+ {
+ php_http_option_t *opt = Z_PTR_P(pData);
+
+- zval_ptr_dtor(&opt->defval);
++ zval_internal_dtor(&opt->defval);
+ zend_hash_destroy(&opt->suboptions.options);
+ zend_string_release(opt->name);
+ pefree(opt, opt->persistent);
diff --git a/512f733beac73f37ba4acbcf730ebc6c6de849b6.patch b/512f733beac73f37ba4acbcf730ebc6c6de849b6.patch
new file mode 100644
index 0000000..44282d0
--- /dev/null
+++ b/512f733beac73f37ba4acbcf730ebc6c6de849b6.patch
@@ -0,0 +1,24 @@
+From 512f733beac73f37ba4acbcf730ebc6c6de849b6 Mon Sep 17 00:00:00 2001
+From: Michael Wallner <mike@php.net>
+Date: Tue, 26 Jun 2018 15:40:28 +0200
+Subject: [PATCH] attempt to fix #78
+
+PHP-7.3 build fails on x86 due to change of the calling convention of
+the zif_handler
+---
+ src/php_http_client_curl_user.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/php_http_client_curl_user.c b/src/php_http_client_curl_user.c
+index d44f3da..1f69a51 100644
+--- a/src/php_http_client_curl_user.c
++++ b/src/php_http_client_curl_user.c
+@@ -22,7 +22,7 @@ typedef struct php_http_client_curl_user_ev {
+ php_http_client_curl_user_context_t *context;
+ } php_http_client_curl_user_ev_t;
+
+-static void php_http_client_curl_user_handler(INTERNAL_FUNCTION_PARAMETERS)
++static ZEND_NAMED_FUNCTION(php_http_client_curl_user_handler)
+ {
+ zval *zstream = NULL, *zclient = NULL;
+ php_stream *stream = NULL;
diff --git a/php-pecl-http.spec b/php-pecl-http.spec
index 6142e67..34593d5 100644
--- a/php-pecl-http.spec
+++ b/php-pecl-http.spec
@@ -50,7 +50,7 @@ Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 0.3.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: http://pecl.php.net/get/%{proj_name}-%{upstream_version}%{?upstream_prever}.tgz
%endif
Summary: Extended HTTP support
@@ -61,6 +61,9 @@ URL: http://pecl.php.net/package/pecl_http
# From http://www.php.net/manual/en/http.configuration.php
Source1: %{proj_name}.ini
+Patch0: https://github.com/m6w6/ext-http/commit/512f733beac73f37ba4acbcf730ebc6c6de849b6.patch
+Patch1: https://github.com/m6w6/ext-http/commit/377d576a6e68def5708cf1ffcd3c233c4dddf356.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7
BuildRequires: %{?scl_prefix}php-hash
@@ -172,6 +175,8 @@ mv %{proj_name}-%{upstream_version}%{?upstream_prever} NTS
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
cd NTS
+%patch0 -p1 -b .up0
+%patch1 -p1 -b .up1
extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:dev}"; then
@@ -359,6 +364,9 @@ fi
%changelog
+* Tue Jun 26 2018 Remi Collet <remi@remirepo.net> - 3.2.0~RC1-2
+- add upstream patches for PHP 7.3
+
* Tue Apr 10 2018 Remi Collet <remi@remirepo.net> - 3.2.0~RC1-1
- update to 3.2.0RC1
- enable brotli compression support on F28+