Skip to content

Commit 38853e6

Browse files
committed
Fix PCNTL warning by introducing a dummy function for tick dunction
1 parent 044f675 commit 38853e6

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;
@@ -1384,6 +1385,11 @@ void pcntl_signal_dispatch()
13841385
sigprocmask(SIG_SETMASK, &old_mask, NULL);
13851386
}
13861387

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

0 commit comments

Comments
 (0)