From 5c3f778c75b95187074ff9174307900c879da1fc Mon Sep 17 00:00:00 2001 From: Go Kudo Date: Fri, 16 Aug 2024 20:11:45 +0000 Subject: [PATCH] zend_max_execution_timer: fix gcc compatibility --- Zend/zend_max_execution_timer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Zend/zend_max_execution_timer.c b/Zend/zend_max_execution_timer.c index 6ab2c0892c038..6cd2300d3ff43 100644 --- a/Zend/zend_max_execution_timer.c +++ b/Zend/zend_max_execution_timer.c @@ -24,13 +24,14 @@ #include #include +#include "zend.h" +#include "zend_globals.h" +#include "zend_portability.h" + #if __has_feature(memory_sanitizer) # include #endif -#include "zend.h" -#include "zend_globals.h" - // Musl Libc defines this macro, glibc does not // According to "man 2 timer_create" this field should always be available, but it's not: https://sourceware.org/bugzilla/show_bug.cgi?id=27417 # ifndef sigev_notify_thread_id @@ -53,8 +54,8 @@ ZEND_API void zend_max_execution_timer_init(void) /* {{{ */ #if __has_feature(memory_sanitizer) /* MSan does not intercept timer_create() */ - __msan_unpoison(&EG(max_execution_timer_timer), - sizeof(EG(max_execution_timer_timer))); + __msan_unpoison(&EG(max_execution_timer_timer), + sizeof(EG(max_execution_timer_timer))); #endif // Measure wall time instead of CPU time as originally planned now that it is possible https://github.com/php/php-src/pull/6504#issuecomment-1370303727