summaryrefslogtreecommitdiffstats
path: root/bebc3a0890156b9067b19f9c56766d132647fd58.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-09-21 14:50:50 +0200
committerRemi Collet <remi@remirepo.net>2020-09-21 14:50:50 +0200
commitb087aa85ee6ab8173614ac9d30fa30990c1cb93d (patch)
treee3405f8251d1f8caf5b1c6d1b6159e36b48316db /bebc3a0890156b9067b19f9c56766d132647fd58.patch
parent818b239361ce36fbe146ece5576406cc14fdb32c (diff)
add upstream patch for EL-6 and for PHP 8
add patch for EL-6 from https://github.com/swoole/swoole-src/pull/3686
Diffstat (limited to 'bebc3a0890156b9067b19f9c56766d132647fd58.patch')
-rw-r--r--bebc3a0890156b9067b19f9c56766d132647fd58.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/bebc3a0890156b9067b19f9c56766d132647fd58.patch b/bebc3a0890156b9067b19f9c56766d132647fd58.patch
new file mode 100644
index 0000000..307737b
--- /dev/null
+++ b/bebc3a0890156b9067b19f9c56766d132647fd58.patch
@@ -0,0 +1,41 @@
+From bebc3a0890156b9067b19f9c56766d132647fd58 Mon Sep 17 00:00:00 2001
+From: twosee <twose@qq.com>
+Date: Sat, 19 Sep 2020 07:15:07 +0800
+Subject: [PATCH] Fix PHP8 build (zend_compile_string change) (#3675)
+
+---
+ php_swoole_cxx.cc | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/php_swoole_cxx.cc b/php_swoole_cxx.cc
+index 0360cf2779..adfa535132 100644
+--- a/php_swoole_cxx.cc
++++ b/php_swoole_cxx.cc
+@@ -12,7 +12,13 @@ SW_API zend_string **sw_zend_known_strings = nullptr;
+
+ //----------------------------------Swoole known string------------------------------------
+
+-static zend_op_array *swoole_compile_string(zval *source_string, ZEND_STR_CONST char *filename);
++#if PHP_VERSION_ID < 80000
++typedef zval zend_source_string_t;
++#else
++typedef zend_string zend_source_string_t;
++#endif
++
++static zend_op_array *swoole_compile_string(zend_source_string_t *source_string, ZEND_STR_CONST char *filename);
+
+ bool zend::include(std::string file) {
+ zend_file_handle file_handle;
+@@ -51,9 +57,10 @@ bool zend::include(std::string file) {
+ }
+
+ // for compatibly with dis_eval
+-static zend_op_array *(*old_compile_string)(zval *source_string, ZEND_STR_CONST char *filename);
+
+-static zend_op_array *swoole_compile_string(zval *source_string, ZEND_STR_CONST char *filename) {
++static zend_op_array *(*old_compile_string)(zend_source_string_t *source_string, ZEND_STR_CONST char *filename);
++
++static zend_op_array *swoole_compile_string(zend_source_string_t *source_string, ZEND_STR_CONST char *filename) {
+ zend_op_array *opa = old_compile_string(source_string, filename);
+ opa->type = ZEND_USER_FUNCTION;
+ return opa;