Date: Fri, 6 Nov 2020 11:22:10 +0000 (UTC) From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r554221 - head/devel/pecl-inotify/files Message-ID: <202011061122.0A6BMAnx091584@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sunpoet Date: Fri Nov 6 11:22:10 2020 New Revision: 554221 URL: https://svnweb.freebsd.org/changeset/ports/554221 Log: Fix build with PHP 8.0 Added: head/devel/pecl-inotify/files/patch-inotify.c (contents, props changed) head/devel/pecl-inotify/files/patch-php_inotify.h (contents, props changed) Added: head/devel/pecl-inotify/files/patch-inotify.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/pecl-inotify/files/patch-inotify.c Fri Nov 6 11:22:10 2020 (r554221) @@ -0,0 +1,14 @@ +--- inotify.c.orig 2016-01-30 12:34:05 UTC ++++ inotify.c +@@ -28,6 +28,11 @@ + #include "ext/standard/info.h" + #include "php_inotify.h" + ++#if PHP_MAJOR_VERSION >= 8 ++#define TSRMLS_CC ++#define TSRMLS_DC ++#endif ++ + /* {{{ arginfo */ + ZEND_BEGIN_ARG_INFO_EX(arginfo_inotify_init, 0, ZEND_RETURN_VALUE, 0) + ZEND_END_ARG_INFO() Added: head/devel/pecl-inotify/files/patch-php_inotify.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/pecl-inotify/files/patch-php_inotify.h Fri Nov 6 11:22:10 2020 (r554221) @@ -0,0 +1,28 @@ +--- php_inotify.h.orig 2020-10-24 21:00:19 UTC ++++ php_inotify.h +@@ -71,14 +71,25 @@ PHP_FUNCTION(inotify_read); + #define INOTIFY_RM_WATCH_EINVAL \ + "The file descriptor is not an inotify instance or the watch descriptor is invalid" + ++#if PHP_MAJOR_VERSION >= 8 + #define INOTIFY_ERROR_CASE(func, errno) \ + case (errno): \ ++ php_error_docref(NULL, E_WARNING, INOTIFY_##func##_##errno); \ ++ break; ++#define INOTIFY_DEFAULT_ERROR(errno) \ ++ default: \ ++ php_error_docref(NULL, E_WARNING, "%s", strerror(errno)); \ ++ break; ++#else ++#define INOTIFY_ERROR_CASE(func, errno) \ ++ case (errno): \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, INOTIFY_##func##_##errno); \ + break; + #define INOTIFY_DEFAULT_ERROR(errno) \ + default: \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno)); \ + break; ++#endif + + + #endif /* PHP_INOTIFY_H */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011061122.0A6BMAnx091584>