Skip to content

Commit cdc0bbe

Browse files
committed
Fix PCNTL warning by introducing a dummy function for tick dunction
1 parent bcf0d29 commit cdc0bbe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ext/pcntl/pcntl.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ static void pcntl_siginfo_to_zval(int, siginfo_t*, zval*);
9090
static void pcntl_signal_handler(int);
9191
#endif
9292
static void pcntl_signal_dispatch(void);
93+
static void pcntl_signal_dispatch_tick_function(int dummy_int, void *dummy_pointer);
9394
static void pcntl_interrupt_function(zend_execute_data *execute_data);
9495

9596
void php_register_signal_constants(INIT_FUNC_ARGS)
@@ -424,7 +425,7 @@ static PHP_GINIT_FUNCTION(pcntl)
424425

425426
PHP_RINIT_FUNCTION(pcntl)
426427
{
427-
php_add_tick_function(pcntl_signal_dispatch, NULL);
428+
php_add_tick_function(pcntl_signal_dispatch_tick_function, NULL);
428429
zend_hash_init(&PCNTL_G(php_signal_table), 16, NULL, ZVAL_PTR_DTOR, 0);
429430
PCNTL_G(head) = PCNTL_G(tail) = PCNTL_G(spares) = NULL;
430431
PCNTL_G(async_signals) = 0;
@@ -1385,6 +1386,11 @@ void pcntl_signal_dispatch()
13851386
sigprocmask(SIG_SETMASK, &old_mask, NULL);
13861387
}
13871388

1389+
void pcntl_signal_dispatch_tick_function(int dummy_int, void *dummy_pointer)
1390+
{
1391+
return pcntl_signal_dispatch();
1392+
}
1393+
13881394
/* {{{ Enable/disable asynchronous signal handling and return the old setting. */
13891395
PHP_FUNCTION(pcntl_async_signals)
13901396
{

0 commit comments

Comments
 (0)