From 097125babea39f5c75c3586943ce87eb9bfd6e6b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 22 Aug 2018 09:03:27 +0200 Subject: add upstream patch for ZTS --- d3433a1875581d66530874c44345fc74e8eebc64.patch | 37 ++++++++++++++++++++++++++ php-pecl-uv.spec | 7 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 d3433a1875581d66530874c44345fc74e8eebc64.patch diff --git a/d3433a1875581d66530874c44345fc74e8eebc64.patch b/d3433a1875581d66530874c44345fc74e8eebc64.patch new file mode 100644 index 0000000..bf7580a --- /dev/null +++ b/d3433a1875581d66530874c44345fc74e8eebc64.patch @@ -0,0 +1,37 @@ +From d3433a1875581d66530874c44345fc74e8eebc64 Mon Sep 17 00:00:00 2001 +From: Bob Weinand +Date: Sun, 8 Jul 2018 09:07:31 +0200 +Subject: [PATCH] Fix ZTS build + +--- + php_uv.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/php_uv.c b/php_uv.c +index b150fc4..18a4b14 100644 +--- a/php_uv.c ++++ b/php_uv.c +@@ -1364,7 +1364,11 @@ static int php_uv_do_callback3(zval *retval_ptr, php_uv_t *uv, zval *params, int + uv->callback[type]->fci.param_count = param_count; + uv->callback[type]->fci.no_separation = 1; + uv->callback[type]->fci.object = NULL; ++#if PHP_VERSION_ID >= 70300 ++ uv->callback[type]->fci.size = sizeof(zend_fcall_info); ++#else + uv->callback[type]->fcc.initialized = 1; ++#endif + + uv->callback[type]->fcc.calling_scope = NULL; + uv->callback[type]->fcc.called_scope = NULL; +@@ -2566,7 +2570,11 @@ PHP_MINIT_FUNCTION(uv) + { + PHP_UV_PROBE(MINIT); + ++#ifdef PHP_VERSION_ID >= 70300 ++ memcpy(&uv_default_handlers, &std_object_handlers, sizeof(zend_object_handlers)); ++#else + memcpy(&uv_default_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); ++#endif + uv_default_handlers.clone_obj = NULL; + uv_default_handlers.get_constructor = php_uv_get_ctor; + uv_default_handlers.cast_object = php_uv_cast_object; diff --git a/php-pecl-uv.spec b/php-pecl-uv.spec index ad0ca31..6fdac09 100644 --- a/php-pecl-uv.spec +++ b/php-pecl-uv.spec @@ -19,7 +19,7 @@ Summary: Libuv wrapper Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 0.2.2 -Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -29,6 +29,7 @@ Patch0: https://github.com/bwoebi/php-uv/commit/880d84cd838f334d88adb888 Patch1: https://github.com/bwoebi/php-uv/commit/2ba4d96379a826050d91b039775e9d1e148d5ef2.patch Patch2: https://github.com/bwoebi/php-uv/commit/fc685d1cb58746a8865fc4b86a38f90219de90ed.patch Patch3: https://patch-diff.githubusercontent.com/raw/bwoebi/php-uv/pull/60.patch +Patch4: https://github.com/bwoebi/php-uv/commit/d3433a1875581d66530874c44345fc74e8eebc64.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 7 @@ -95,6 +96,7 @@ cd NTS %patch1 -p1 -b .up1 %patch2 -p1 -b .up2 %patch3 -p1 -b .pr60 +%patch4 -p1 -b .up3 # Sanity check, really often broken extver=$(sed -n '/define PHP_UV_VERSION/{s/.* "//;s/".*$//;p}' php_uv.h) @@ -240,6 +242,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Wed Aug 22 2018 Remi Collet - 0.2.2-6 +- add upstream patch for ZTS + * Thu Aug 16 2018 Remi Collet - 0.2.2-5 - rebuild for 7.3.0beta2 new ABI -- cgit