From 7fd66dfb90f0b99df2a6591361b89ce6dd1c8135 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 29 Jan 2024 17:02:05 +0100 Subject: Fix incompatible pointer types using patch from https://github.com/m6w6/ext-http/pull/134 --- pecl_http-build.patch | 22 ++++++++++++++++++++++ php-pecl-http.spec | 16 ++++++++++++---- 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 pecl_http-build.patch diff --git a/pecl_http-build.patch b/pecl_http-build.patch new file mode 100644 index 0000000..887a6ed --- /dev/null +++ b/pecl_http-build.patch @@ -0,0 +1,22 @@ +From 88e279db21e25244ecb6b804af0a6565db4ecbf1 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 29 Jan 2024 16:10:26 +0100 +Subject: [PATCH] Fix incompatible pointer types + +--- + src/php_http_url.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/php_http_url.c b/src/php_http_url.c +index 943a436c..459396f3 100644 +--- a/src/php_http_url.c ++++ b/src/php_http_url.c +@@ -73,7 +73,7 @@ static inline char *localhostname(void) + static php_http_url_t *php_http_url_from_env(void) + { + zval *https, *zhost, *zport; +- long port; ++ zend_long port; + php_http_buffer_t buf; + + php_http_buffer_init_ex(&buf, MAX(PHP_HTTP_BUFFER_DEFAULT_SIZE, sizeof(php_http_url_t)<<2), PHP_HTTP_BUFFER_INIT_PREALLOC); diff --git a/php-pecl-http.spec b/php-pecl-http.spec index b16a0fd..5ecc929 100644 --- a/php-pecl-http.spec +++ b/php-pecl-http.spec @@ -3,7 +3,7 @@ # # Fedora spec file for php-pecl-http # -# Copyright (c) 2012-2023 Remi Collet +# Copyright (c) 2012-2024 Remi Collet # License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -51,7 +51,7 @@ Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} Release: 0.10.%{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: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://pecl.php.net/get/%{proj_name}-%{upstream_version}%{?upstream_prever}.tgz %endif Summary: Extended HTTP support @@ -62,6 +62,8 @@ URL: https://pecl.php.net/package/pecl_http # From http://www.php.net/manual/en/http.configuration.php Source1: %{proj_name}.ini +Patch0: %{proj_name}-build.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 8.0 @@ -69,8 +71,8 @@ BuildRequires: %{?scl_prefix}php-spl BuildRequires: %{?scl_prefix}php-pear BuildRequires: zlib-devel >= 1.2.0.4 BuildRequires: curl-devel >= 7.18.2 -# We require 72 to ensure we use the same version than PHP -BuildRequires: pkgconfig(icu-i18n) >= 72 +# We require 73 to ensure we use the same version than PHP +BuildRequires: pkgconfig(icu-i18n) >= 73 BuildRequires: %{?scl_prefix}php-pecl-raphf-devel >= 2 BuildRequires: pkgconfig(libevent) >= 2 # only needed in F27+ @@ -134,6 +136,8 @@ mv NTS/package.xml . %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} cd %{sources} +%patch -P0 -p1 + 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 : Error: Upstream HTTP version is now ${extver}, expecting %{upstream_version}%{?upstream_prever}%{?gh_date:dev}. @@ -317,6 +321,10 @@ fi %changelog +* Mon Jan 29 2024 Remi Collet - 4.2.4-4 +- Fix incompatible pointer types using patch from + https://github.com/m6w6/ext-http/pull/134 + * Mon Oct 2 2023 Remi Collet - 4.2.4-1 - update to 4.2.4 -- cgit