1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

databases/pecl-redis: Unbreak for php84

Approved by:	portmgr (blanket)
This commit is contained in:
Muhammad Moinur Rahman 2024-08-03 19:54:29 +02:00
parent 20b76c543e
commit 13e83b088b
No known key found for this signature in database
GPG Key ID: BDB9B5A617C0BC91
4 changed files with 47 additions and 2 deletions

View File

@ -12,7 +12,6 @@ LICENSE_FILE= ${WRKSRC}/COPYING
USES= php:build,pecl USES= php:build,pecl
USE_PHP= session:build USE_PHP= session:build
IGNORE_WITH_PHP= 84
OPTIONS_DEFINE= IGBINARY OPTIONS_DEFINE= IGBINARY
IGBINARY_DESC= Build with Igbinary serializer IGBINARY_DESC= Build with Igbinary serializer

View File

@ -0,0 +1,20 @@
--- backoff.c.orig 2024-08-03 17:49:28 UTC
+++ backoff.c
@@ -1,9 +1,17 @@
#include "common.h"
+#if PHP_VERSION_ID <= 80300
#include <ext/standard/php_rand.h>
+#else
+#include <ext/random/php_random.h>
+#endif
#if PHP_VERSION_ID >= 70100
+#if PHP_VERSION_ID <= 80300
#include <ext/standard/php_mt_rand.h>
+#else
+#include <ext/random/php_random.h>
+#endif
#else
static zend_long php_mt_rand_range(zend_long min, zend_long max) {
zend_long number = php_rand();

View File

@ -0,0 +1,14 @@
--- library.c.orig 2024-08-03 17:50:52 UTC
+++ library.c
@@ -56,7 +56,11 @@
#include <ext/json/php_json.h>
#endif
+#if PHP_VERSION_ID <= 80300
#include <ext/standard/php_rand.h>
+#else
+#include <ext/random/php_random.h>
+#endif
#include <ext/hash/php_hash.h>
#define UNSERIALIZE_NONE 0

View File

@ -1,6 +1,18 @@
--- redis.c.orig 2022-02-15 18:25:22 UTC --- redis.c.orig 2022-02-15 18:25:22 UTC
+++ redis.c +++ redis.c
@@ -154,6 +154,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pconnect, 0, 0, 1) @@ -27,7 +27,11 @@
#include "redis_cluster.h"
#include "redis_commands.h"
#include "redis_sentinel.h"
+#if PHP_VERSION_ID <= 80300
#include <standard/php_random.h>
+#else
+#include <ext/random/php_random.h>
+#endif
#include <zend_exceptions.h>
#include <ext/standard/info.h>
#include <ext/hash/php_hash.h>
@@ -154,6 +158,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pconnect, 0, 0, 1)
ZEND_ARG_INFO(0, host) ZEND_ARG_INFO(0, host)
ZEND_ARG_INFO(0, port) ZEND_ARG_INFO(0, port)
ZEND_ARG_INFO(0, timeout) ZEND_ARG_INFO(0, timeout)