summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-08-09 09:55:29 +0200
committerRemi Collet <remi@remirepo.net>2017-08-09 09:55:29 +0200
commit55ae6474b4371e9c3fc24d5c15d8ddbc488f4c8c (patch)
tree8f503a94c5de284253cc7b458922e8315882e94d
parent159fec6b76d00b8b78b66fb4e0c0474dc657ec54 (diff)
patch for bigendian
-rw-r--r--ds-bigendian.patch28
-rw-r--r--php-pecl-ds.spec8
2 files changed, 35 insertions, 1 deletions
diff --git a/ds-bigendian.patch b/ds-bigendian.patch
new file mode 100644
index 0000000..142e232
--- /dev/null
+++ b/ds-bigendian.patch
@@ -0,0 +1,28 @@
+From a58289f27fa95a410e2d839911740e6a3f8bf765 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 9 Aug 2017 09:42:03 +0200
+Subject: [PATCH] Fix #88 use correct type for variadic
+
+---
+ src/php/parameters.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/php/parameters.h b/src/php/parameters.h
+index 77dbfce..32518e3 100644
+--- a/src/php/parameters.h
++++ b/src/php/parameters.h
+@@ -51,12 +51,12 @@ PARSE_2("zl", &z, &l)
+
+ #define PARSE_VARIADIC_ZVAL() \
+ zval *argv = NULL; \
+-zend_long argc = 0; \
++int argc = 0; \
+ PARSE_2("*", &argv, &argc)
+
+ #define PARSE_LONG_AND_VARIADIC_ZVAL(_l) \
+ zval *argv = NULL; \
+-zend_long argc = 0; \
++int argc = 0; \
+ zend_long _l = 0; \
+ PARSE_3("l*", &_l, &argv, &argc)
+
diff --git a/php-pecl-ds.spec b/php-pecl-ds.spec
index 4c3dc58..ede760c 100644
--- a/php-pecl-ds.spec
+++ b/php-pecl-ds.spec
@@ -30,7 +30,7 @@
Summary: Data Structures for PHP
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 1.2.2
-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;')}}
License: MIT
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
@@ -39,6 +39,8 @@ Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
# in composer.json: "require-dev": { "php-ds/tests": "dev-master" }
Source1: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{gh_short}.tar.gz
+Patch0: %{pecl_name}-bigendian.patch
+
BuildRequires: %{?scl_prefix}php-devel >= 7
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
@@ -95,6 +97,7 @@ mv %{gh_project}-%{gh_commit} tests
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
cd NTS
+%patch0 -p1 -b .bigendian
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_DS_VERSION/{s/.* "//;s/".*$//;p}' php_ds.h)
@@ -233,6 +236,9 @@ cd ..
%changelog
+* Wed Aug 9 2017 Remi Collet <remi@remirepo.net> - 1.2.2-2
+- add patch for bigendian
+
* Mon Aug 7 2017 Remi Collet <remi@remirepo.net> - 1.2.2-1
- Update to 1.2.2