kumquat-buildroot/package/php-zmq/0003-fix-for-php-8.0.0beta2.patch
Adam Duskett 23f8a58e9a package/php-zmq: add upstream php8 compatibility patches
These patches are necessary for compiling against php8. These patches also
retain the ability to compile against PHP7.2 and should be removed during the
next version bump.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-07-03 21:56:51 +02:00

41 lines
1.2 KiB
Diff

From f0993f1fe973c4d359323ad1897ed7aa74f7e015 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 24 Aug 2020 15:55:54 +0200
Subject: [PATCH] fix for PHP 8.0.0beta2
Signed-off-by: Remi Collet <remi@remirepo.net>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
zmq.c | 2 ++
zmq_device.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/zmq.c b/zmq.c
index 89902f9..bd2401d 100644
--- a/zmq.c
+++ b/zmq.c
@@ -621,7 +621,9 @@ zend_bool php_zmq_connect_callback(zval *socket, zend_fcall_info *fci, zend_fcal
fci->params = params;
fci->param_count = 2;
fci->retval = &retval;
+#if PHP_VERSION_ID < 80000
fci->no_separation = 1;
+#endif
if (zend_call_function(fci, fci_cache) == FAILURE) {
if (!EG(exception)) {
diff --git a/zmq_device.c b/zmq_device.c
index 534f966..1c6aa3e 100644
--- a/zmq_device.c
+++ b/zmq_device.c
@@ -53,7 +53,9 @@ zend_bool s_invoke_device_cb (php_zmq_device_cb_t *cb, uint64_t current_ts)
cb->fci.param_count = 1;
/* Call the cb */
+#if PHP_VERSION_ID < 80000
cb->fci.no_separation = 1;
+#endif
cb->fci.retval = &fc_retval;
if (zend_call_function(&(cb->fci), &(cb->fci_cache)) == FAILURE) {