Skip to content

Commit aa7813d

Browse files
committed
fix non-ZTS support
1 parent 83e8722 commit aa7813d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Zend/Zend.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,16 @@ fi
297297
AC_MSG_CHECKING(whether to enable zend signal handling)
298298
AC_MSG_RESULT($ZEND_SIGNALS)
299299
300+
301+
dnl Enable Zend Max Execution Timers by default on macOS
302+
AS_CASE(["$host_alias"], [*darwin*], [ZEND_MAX_EXECUTION_TIMERS="yes"], [ZEND_MAX_EXECUTION_TIMERS=$ZEND_ZTS])
303+
300304
dnl Don't enable Zend Max Execution Timers by default until PHP 8.3 to not break the ABI
301305
AC_ARG_ENABLE([zend-max-execution-timers],
302306
[AS_HELP_STRING([--enable-zend-max-execution-timers],
303307
[whether to enable zend max execution timers])],
304308
[ZEND_MAX_EXECUTION_TIMERS=$enableval],
305-
[ZEND_MAX_EXECUTION_TIMERS=$ZEND_ZTS])
309+
[])
306310
307311
AS_CASE(
308312
["$host_alias"],

Zend/zend_max_execution_timer.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include <dispatch/dispatch.h>
2222
# ifdef ZTS
2323
#include <pthread.h>
24+
# else
25+
#include <signal.h>
2426
# endif
2527

2628
#include "zend.h"
@@ -69,7 +71,7 @@ ZEND_API void zend_max_execution_timer_init(void) /* {{{ */
6971
#else
7072
pid_t *ppid = malloc(sizeof(pid_t));
7173
*ppid = pid;
72-
dispatch_set_context(EG(max_execution_timer_timer), ppid)
74+
dispatch_set_context(EG(max_execution_timer_timer), ppid);
7375
# endif
7476

7577
dispatch_source_set_event_handler_f(EG(max_execution_timer_timer), zend_max_execution_timer_handler);

0 commit comments

Comments
 (0)