summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-03-17 08:43:55 +0100
committerRemi Collet <remi@php.net>2023-03-17 08:43:55 +0100
commitb55c2beca1569b4ee686247f8a607a44a01ab802 (patch)
tree5f6c3feff49bb9e832d4e6517ba42c7302d16920
parente9dc26c424cf15fd15c465bbc2520d175398e794 (diff)
fix https://github.com/awslabs/aws-crt-php/issues/95 PHP 5.x compatibility
using patch from https://github.com/awslabs/aws-crt-php/pull/96
-rw-r--r--0001-fix-95-compatibility-with-PHP-5.x.patch24
-rw-r--r--php-pecl-awscrt.spec7
2 files changed, 30 insertions, 1 deletions
diff --git a/0001-fix-95-compatibility-with-PHP-5.x.patch b/0001-fix-95-compatibility-with-PHP-5.x.patch
new file mode 100644
index 0000000..7865033
--- /dev/null
+++ b/0001-fix-95-compatibility-with-PHP-5.x.patch
@@ -0,0 +1,24 @@
+From 8a74a146b73f60bb2497ab313fe2db0bb3937597 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 17 Mar 2023 08:34:21 +0100
+Subject: [PATCH] fix #95 compatibility with PHP 5.x
+
+---
+ ext/php_aws_crt.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ext/php_aws_crt.h b/ext/php_aws_crt.h
+index 68951c1..a1fd37c 100644
+--- a/ext/php_aws_crt.h
++++ b/ext/php_aws_crt.h
+@@ -60,6 +60,7 @@ ZEND_EXTERN_MODULE_GLOBALS(awscrt)
+ # define XRETURN_STRING(s) RETURN_STRING(s, 1)
+ # define XRETVAL_STRINGL(s, l) RETVAL_STRINGL(s, l, 1)
+ # define XRETVAL_STRING(s) RETVAL_STRING(s, 1)
++# define zend_error_noreturn zend_error
+ #endif /* PHP 5.x */
+
+ #include "api.h"
+--
+2.39.2
+
diff --git a/php-pecl-awscrt.spec b/php-pecl-awscrt.spec
index 4511b16..ffc1064 100644
--- a/php-pecl-awscrt.spec
+++ b/php-pecl-awscrt.spec
@@ -36,6 +36,8 @@ License: Apache-2.0
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Patch0: 0001-fix-95-compatibility-with-PHP-5.x.patch
+
%if 0%{?rhel} == 7 && 0%{?dtsversion} == 0
BuildRequires: devtoolset-6-toolchain
%global dtsversion 6
@@ -97,6 +99,8 @@ sed -e 's/role="test"/role="src"/' \
mv %{pecl_name}-%{version} NTS
pushd NTS
+%patch0 -p1 -b .pr96
+
# Parallel build
sed -e '/(CMAKE_BUILD)/s/$/ --verbose %{?_smp_mflags}/' -i Makefile.frag
@@ -224,7 +228,8 @@ fi
%changelog
* Fri Mar 17 2023 Remi Collet <remi@remirepo.net> - 1.2.0-1
- update to 1.2.0 (stable)
-- open https://github.com/awslabs/aws-crt-php/issues/95 PHP 5.x compatibility
+- fix https://github.com/awslabs/aws-crt-php/issues/95 PHP 5.x compatibility
+ using patch from https://github.com/awslabs/aws-crt-php/pull/96
* Thu Mar 16 2023 Remi Collet <remi@remirepo.net> - 1.1.0-1
- update to 1.1.0 (devel)