1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Add missing cstddef include for C++ builds

Closes GH-15096.
This commit is contained in:
Christoph M. Becker
2024-07-24 21:51:46 +02:00
parent ad452086d9
commit ab449a7e46
2 changed files with 7 additions and 2 deletions

1
NEWS
View File

@@ -6,6 +6,7 @@ PHP NEWS
. Fix GH-14978 (The xmlreader extension phpize build). (Peter Kokot)
. Throw Error exception when encountering recursion during comparison, rather
than fatal error. (ilutov)
. Added missing cstddef include for C++ builds. (cmb)
- BCMath:
. Adjust bcround()'s $mode parameter to only accept the RoundingMode

View File

@@ -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 <cstddef>
}
typedef std::max_align_t zend_max_align_t;
#else
typedef union {
char c;