From 06ae94fe9a2a86b9719ff8da8ab753032a86efae Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 30 Dec 2016 20:00:04 +0100 Subject: php-pecl-swoole: 2.0.5 with ZTS patch --- REFLECTION-DEV | 4 ++-- php-pecl-swoole-dev.spec | 5 +++++ swoole-pr992.patch | 23 +++++++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 swoole-pr992.patch diff --git a/REFLECTION-DEV b/REFLECTION-DEV index dcd0640..84a6e51 100644 --- a/REFLECTION-DEV +++ b/REFLECTION-DEV @@ -1,4 +1,4 @@ -Extension [ extension #127 swoole version 2.0.4 ] { +Extension [ extension #127 swoole version 2.0.5 ] { - INI { Entry [ swoole.aio_thread_num ] @@ -63,7 +63,7 @@ Extension [ extension #127 swoole version 2.0.4 ] { Constant [ integer SWOOLE_DTLSv1_CLIENT_METHOD ] { 17 } Constant [ integer SWOOLE_EVENT_READ ] { 512 } Constant [ integer SWOOLE_EVENT_WRITE ] { 1024 } - Constant [ string SWOOLE_VERSION ] { 2.0.4 } + Constant [ string SWOOLE_VERSION ] { 2.0.5 } Constant [ integer SWOOLE_REDIS_MODE_MULTI ] { 0 } Constant [ integer SWOOLE_REDIS_MODE_PIPELINE ] { 1 } Constant [ integer SWOOLE_REDIS_TYPE_NOT_FOUND ] { 0 } diff --git a/php-pecl-swoole-dev.spec b/php-pecl-swoole-dev.spec index f5b487a..2693303 100644 --- a/php-pecl-swoole-dev.spec +++ b/php-pecl-swoole-dev.spec @@ -37,6 +37,8 @@ Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Patch0: %{pecl_name}-pr992.patch + BuildRequires: %{?scl_prefix}php-devel >= 5.5 BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-sockets @@ -131,6 +133,8 @@ sed -e 's/role="test"/role="src"/' \ cd NTS +%patch0 -p1 -b .pr992 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_SWOOLE_VERSION/{s/.* "//;s/".*$//;p}' php_swoole.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -268,6 +272,7 @@ cd ../ZTS * Fri Dec 30 2016 Remi Collet - 2.0.5-1 - Update to 2.0.5 (beta) - raise dependency on PHP 5.5 +- add ZTS patch from https://github.com/swoole/swoole-src/pull/992 * Fri Dec 30 2016 Remi Collet - 2.0.4-1 - Update to 2.0.4 (beta) diff --git a/swoole-pr992.patch b/swoole-pr992.patch new file mode 100644 index 0000000..a5788d3 --- /dev/null +++ b/swoole-pr992.patch @@ -0,0 +1,23 @@ +From dc26ffb786701033cb2fe7eae01ccb09a5f829b1 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Fri, 30 Dec 2016 19:32:47 +0100 +Subject: [PATCH] another fix for ZTS + +--- + swoole_redis_coro.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/swoole_redis_coro.c b/swoole_redis_coro.c +index a0a650e..28b907c 100755 +--- a/swoole_redis_coro.c ++++ b/swoole_redis_coro.c +@@ -3732,6 +3732,9 @@ void swoole_redis_coro_onClose(const redisAsyncContext *c, int status) + + static int swoole_redis_onError(swReactor *reactor, swEvent *event) + { ++#if PHP_MAJOR_VERSION < 7 ++ TSRMLS_FETCH_FROM_CTX(sw_thread_ctx ? sw_thread_ctx : NULL); ++#endif + swRedisClient *redis = event->socket->object; + redisAsyncContext *c = redis->context; + zend_update_property_long(swoole_redis_coro_class_entry_ptr, redis->object, ZEND_STRL("errCode"), c->err TSRMLS_CC); -- cgit