Skip to content

Commit d78c82f

Browse files
ondrejmirtesclaude
andcommitted
Include zend_portability.h before zend_globals_macros.h
zend_globals_macros.h includes zend_portability.h itself only from PHP 8.4. Against PHP 8.3's headers, the early include that redefines EG() and CG() for PHP 8.6 thread-safe builds found BEGIN_EXTERN_C(), ZEND_API and ZTS undefined and broke every 8.3 compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013qRnM7saDyd5yKXxJAnR7o
1 parent 5fb9346 commit d78c82f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎turbo-ext/src/support.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@
2929
* every gcc/libc target supports — gcc then warns the attribute is ignored */
3030
#pragma GCC diagnostic ignored "-Wattributes"
3131

32+
/* zend_portability.h first: zend_globals_macros.h includes it itself only
33+
* from PHP 8.4, and it brings in the configuration defining ZTS */
3234
extern "C" {
3335
#include "php_version.h"
36+
#include "zend_portability.h"
3437
#include "zend_globals_macros.h"
3538
}
3639

0 commit comments

Comments
 (0)