diff options
-rw-r--r-- | fann-php81.patch | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/fann-php81.patch b/fann-php81.patch index 597d019..735289d 100644 --- a/fann-php81.patch +++ b/fann-php81.patch @@ -1,36 +1,27 @@ -From 319b0bd26acde6f5897f96d5a1f3dfed3f4f482c Mon Sep 17 00:00:00 2001 +From a4b927a0f9e7dce9d0b002e559c314b45acf46ff Mon Sep 17 00:00:00 2001 From: Remi Collet <remi@remirepo.net> Date: Thu, 10 Jun 2021 16:17:26 +0200 Subject: [PATCH] add PHPC_PHP_STAT helper --- - phpc.h | 13 +++++++++++++ - 1 file changed, 13 insertions(+) + phpc.h | 11 +++++++++++ + 1 file changed, 11 insertions(+) diff --git a/phpc.h b/phpc.h -index 9206105..fcf1f02 100644 +index 9206105..8e7211f 100644 --- a/phpc/phpc.h +++ b/phpc/phpc.h -@@ -29,6 +29,8 @@ - #error "Only PHP 5.2+ supported" - #endif - -+#include "ext/standard/php_filestat.h" -+ - /* no operation */ - #define PHPC_NOOP ((void) 0) - -@@ -1595,5 +1597,16 @@ typedef const char phpc_stream_opener_char_t; +@@ -1595,5 +1595,16 @@ typedef const char phpc_stream_opener_char_t; php_stream_locate_url_wrapper(_path, (char **) _path_for_open, _options TSRMLS_CC) #endif +#if (PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION >= 1) || (PHP_MAJOR_VERSION > 8) -+static zend_always_inline void PHPC_PHP_STAT(const char *filename, size_t filename_length, int type, zval *return_value) -+{ -+ zend_string *str = zend_string_init(filename, filename_length, 0); -+ php_stat(str, type, return_value); -+ zend_string_release(str); -+} ++#define PHPC_PHP_STAT(filename, filename_length, type, return_value) do { \ ++ zend_string *str = zend_string_init(filename, filename_length, 0); \ ++ php_stat(str, type, return_value); \ ++ zend_string_release(str); \ ++ } while (0) ++ +#else +#define PHPC_PHP_STAT php_stat +#endif |