summaryrefslogtreecommitdiffstats
path: root/1.patch
blob: a2a6286eec9d4bb1d8312868588536597190c968 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 435049e9b4b55955b77d32e29f7ea7df12799668 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Tue, 2 Mar 2021 08:48:09 +0100
Subject: [PATCH] fix [-Wincompatible-pointer-types] with PHP 8

---
 excimer_log.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/excimer_log.c b/excimer_log.c
index 4d5f74e..4c6b844 100644
--- a/excimer_log.c
+++ b/excimer_log.c
@@ -408,10 +408,17 @@ static void excimer_log_array_incr(HashTable *ht, zend_string *sp_key, zend_long
 	}
 }
 
+#if PHP_VERSION_ID < 80000
 static int excimer_log_aggr_compare(const void *a, const void *b)
 {
 	zval *zp_a = &((Bucket*)a)->val;
 	zval *zp_b = &((Bucket*)b)->val;
+#else
+static int excimer_log_aggr_compare(Bucket *a, Bucket *b)
+{
+	zval *zp_a = &a->val;
+	zval *zp_b = &b->val;
+#endif
 
 	zval *zp_a_incl = zend_hash_str_find(Z_ARRVAL_P(zp_a), "inclusive", sizeof("inclusive")-1);
 	zval *zp_b_incl = zend_hash_str_find(Z_ARRVAL_P(zp_b), "inclusive", sizeof("inclusive")-1);