summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-11-23 07:37:39 +0100
committerRemi Collet <remi@remirepo.net>2020-11-23 07:37:39 +0100
commit883fc719901ca3cbdc6b3822ffaeda145c4a75d5 (patch)
treea7c91a89a9dbb544f961efd5e8c0a2566e471a70
parentfa1d57ed10e873b9ec89c74236027b1084872dd4 (diff)
add upstream patch for PHP 8
-rw-r--r--9ab8f1dfd8889f9e8581452c1ecde11cbb702280.patch30
-rw-r--r--php-pecl-swoole4.spec9
2 files changed, 38 insertions, 1 deletions
diff --git a/9ab8f1dfd8889f9e8581452c1ecde11cbb702280.patch b/9ab8f1dfd8889f9e8581452c1ecde11cbb702280.patch
new file mode 100644
index 0000000..e830498
--- /dev/null
+++ b/9ab8f1dfd8889f9e8581452c1ecde11cbb702280.patch
@@ -0,0 +1,30 @@
+From 9ab8f1dfd8889f9e8581452c1ecde11cbb702280 Mon Sep 17 00:00:00 2001
+From: twosee <twose@qq.com>
+Date: Sun, 22 Nov 2020 17:42:41 +0800
+Subject: [PATCH] Fix sw_zend_is_callable_at_frame() (#3868)
+
+* Fix sw_zend_is_callable_at_frame()
+
+* Require PHP 8.0.1
+---
+ ext-src/php_swoole.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/ext-src/php_swoole.h b/ext-src/php_swoole.h
+index ff32a2cccb..96fc4c9b6b 100644
+--- a/ext-src/php_swoole.h
++++ b/ext-src/php_swoole.h
+@@ -912,10 +912,11 @@ static sw_inline zend_bool sw_zend_is_callable_at_frame(zval *zcallable, zval *z
+ {
+ zend_string *name;
+ zend_bool ret;
+-#if PHP_VERSION_ID < 80000
++#if PHP_VERSION_ID < 80001
+ ret = zend_is_callable_ex(zcallable, zobject ? Z_OBJ_P(zobject) : NULL, check_flags, &name, fci_cache, error);
+ #else
+- ret = zend_is_callable_at_frame(zcallable, zobject ? Z_OBJ_P(zobject) : NULL, frame, check_flags, &name, fci_cache, error);
++ ret = zend_is_callable_at_frame(zcallable, zobject ? Z_OBJ_P(zobject) : NULL, frame, check_flags, fci_cache, error);
++ name = zend_get_callable_name_ex(zcallable, zobject);
+ #endif
+ if (callable_name)
+ {
diff --git a/php-pecl-swoole4.spec b/php-pecl-swoole4.spec
index ef1a207..8c75805 100644
--- a/php-pecl-swoole4.spec
+++ b/php-pecl-swoole4.spec
@@ -34,13 +34,15 @@
Summary: PHP's asynchronous concurrent distributed networking framework
Name: %{?sub_prefix}php-pecl-%{pecl_name}4
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-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;')}}
# Extension is ASL 2.0
# Hiredis is BSD
License: ASL 2.0 and BSD
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Patch0: https://github.com/swoole/swoole-src/commit/9ab8f1dfd8889f9e8581452c1ecde11cbb702280.patch
+
%if 0%{?rhel} == 6
BuildRequires: devtoolset-6-toolchain
%else
@@ -165,6 +167,8 @@ sed \
cd NTS
+%patch0 -p1 -b .up
+
# Sanity check, really often broken
extver=$(sed -n '/#define SWOOLE_VERSION /{s/.* "//;s/".*$//;p}' include/swoole_version.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -335,6 +339,9 @@ cd ../ZTS
%changelog
+* Mon Nov 23 2020 Remi Collet <remi@remirepo.net> - 4.5.8-2
+- add upstream patch for PHP 8
+
* Sat Nov 21 2020 Remi Collet <remi@remirepo.net> - 4.5.8-1
- update to 4.5.8