diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 0acec2bf3baf..8cc2967e6062 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -791,13 +791,9 @@ extern "C++" { # define ZEND_STATIC_ASSERT(c, m) #endif -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) /* C11 */ +#if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) /* C11 */ \ + || (defined(__cplusplus) && __cplusplus >= 201103L) /* C++11 */) && !defined(ZEND_WIN32) 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;