summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--82.patch25
-rw-r--r--php-pecl-nsq.spec9
2 files changed, 33 insertions, 1 deletions
diff --git a/82.patch b/82.patch
new file mode 100644
index 0000000..4417d24
--- /dev/null
+++ b/82.patch
@@ -0,0 +1,25 @@
+From 6fea3565c81b4689d73ea43267f6e42306547ae3 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 30 Jul 2025 14:20:14 +0200
+Subject: [PATCH] use Zend/zend_smart_string.h
+
+---
+ pub.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/pub.c b/pub.c
+index eaa0011..c2fb812 100644
+--- a/pub.c
++++ b/pub.c
+@@ -27,7 +27,11 @@
+ #include "ext/standard/php_var.h"
+ #include <errno.h>
+ #include <fcntl.h>
++#if PHP_VERSION_ID < 70200
+ #include "ext/standard/php_smart_string_public.h"
++#else
++#include "Zend/zend_smart_string.h"
++#endif
+ #include "ext/json/php_json.h"
+ #include "zend_smart_str.h"
+ #include <signal.h>
diff --git a/php-pecl-nsq.spec b/php-pecl-nsq.spec
index 2cad95e..ae11cde 100644
--- a/php-pecl-nsq.spec
+++ b/php-pecl-nsq.spec
@@ -22,11 +22,13 @@
Summary: PHP extension for NSQ client
Name: %{?scl_prefix}php-pecl-nsq
Version: 3.9.1
-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;')}}
Source: https://pecl.php.net/get/%{sources}%{?prever}.tgz
License: PHP-3.01
URL: https://pecl.php.net/package/nsq
+Patch0: 82.patch
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
@@ -59,6 +61,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd %{sources}
+%patch -P0 -p1
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_NSQ_VERSION/{s/.* "//;s/".*$//;p}' php_nsq.h )
if test "x${extver}" != "x%{version}"; then
@@ -175,6 +179,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 3.9.1-2
+- fix build with PHP 8.5.0alpha3 using patch from
+
* Mon Jun 16 2025 Remi Collet <remi@remirepo.net> - 3.9.1-1
- update to 3.9.1