From 06d785c4b38716d1444886f3eb2f409a793eba37 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 24 Jul 2024 21:51:46 +0200 Subject: [PATCH] Add missing cstddef include for C++ builds --- Zend/zend_portability.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 24ded1c78d0a0..5290d7aae4fe3 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -791,9 +791,13 @@ extern "C++" { # define ZEND_STATIC_ASSERT(c, m) #endif -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) /* C11 */ \ - || (defined(__cplusplus) && __cplusplus >= 201103L) /* C++11 */ +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) /* C11 */ typedef max_align_t zend_max_align_t; +#elif (defined(__cplusplus) && __cplusplus >= 201103L) /* C++11 */ +extern "C++" { +# include +} +typedef std::max_align_t zend_max_align_t; #else typedef union { char c;