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

zend_max_execution_timer: fix gcc compatibility (#15447)

This commit is contained in:
Go Kudo
2024-08-17 05:20:04 +09:00
committed by Christoph M. Becker
parent 3162ddbd84
commit 89daa8354f

View File

@@ -24,13 +24,14 @@
#include <sys/syscall.h>
#include <sys/types.h>
#include "zend.h"
#include "zend_globals.h"
#include "zend_portability.h"
#if __has_feature(memory_sanitizer)
# include <sanitizer/msan_interface.h>
#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