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;