File: 0002-Fix-5-Build-with-php-src-master-is-broken.patch

package info (click to toggle)
php-imap 3%3A1.0.2-3~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 844 kB
  • sloc: ansic: 3,841; xml: 153; php: 149; pascal: 112; sh: 6; makefile: 3
file content (26 lines) | stat: -rw-r--r-- 759 bytes parent folder | download
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
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 4 Feb 2024 19:59:07 +0100
Subject: Fix #5: Build with php-src master is broken

---
 imap-1.0.2/php_imap.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/imap-1.0.2/php_imap.c b/imap-1.0.2/php_imap.c
index 22ad1b0..be43d45 100644
--- a/imap-1.0.2/php_imap.c
+++ b/imap-1.0.2/php_imap.c
@@ -805,8 +805,13 @@ PHP_FUNCTION(imap_append)
 		}
 
 		zend_string_release(regex);
+#if PHP_VERSION_ID >= 80400
+		php_pcre_match_impl(pce, internal_date, return_value, subpats, global,
+			Z_L(0), Z_L(0));
+#else
 		php_pcre_match_impl(pce, internal_date, return_value, subpats, global,
 			0, Z_L(0), Z_L(0));
+#endif
 
 		if (!Z_LVAL_P(return_value)) {
 			// TODO Promoto to error?