diff options
Diffstat (limited to 'php7-support.patch')
-rw-r--r-- | php7-support.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/php7-support.patch b/php7-support.patch new file mode 100644 index 000000000000..618903b0cefa --- /dev/null +++ b/php7-support.patch @@ -0,0 +1,32 @@ +diff --git a/systemd.c b/systemd.c +index 9479556..6a0d573 100644 +--- a/systemd.c ++++ b/systemd.c +@@ -30,7 +30,11 @@ ZEND_GET_MODULE(systemd) + PHP_FUNCTION(sd_journal_send) + { + struct iovec *iov = NULL; ++#if ZEND_MODULE_API_NO >= 20151012 ++ zval *args; ++#else + zval ***args; ++#endif + int argc, len, i; + char *val; + +@@ -47,9 +51,15 @@ PHP_FUNCTION(sd_journal_send) + + // Iterate through the PHP arguments and fill the iovector. + for (i = 0; i < ZEND_NUM_ARGS() TSRMLS_CC; ++i) { ++#if ZEND_MODULE_API_NO >= 20151012 ++ convert_to_string_ex(&args[i]); ++ val = Z_STRVAL(args[i]); ++ len = Z_STRLEN(args[i]); ++#else + convert_to_string_ex(args[i]); + val = Z_STRVAL_PP(args[i]); + len = Z_STRLEN_PP(args[i]); ++#endif + iov[i].iov_base = val; + iov[i].iov_len = len; + } |