From 838c23f4e37831ebcdc5c7c41f9ed8b4ab0e653d Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 22 Nov 2026 14:15:26 +0100 Subject: [PATCH] Fix build with PHP 8.0 and older by defining tentative return type macro --- php_gnupg_compat.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/php_gnupg_compat.h b/php_gnupg_compat.h index cecf957..127b595 100644 --- a/php_gnupg_compat.h +++ b/php_gnupg_compat.h @@ -35,4 +35,10 @@ #define GNUPG_COMPARE_HANDLER_NAME compare #endif +/* tentative return types added in PHP 8.1 */ +#ifndef ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX +#define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ + ZEND_BEGIN_ARG_INFO_EX(name, 0, return_reference, required_num_args) +#endif + #endif /* PHP_GNUPG_COMPAT_H */ \ No newline at end of file