From e3b1264950afa02a001c9c62eea886838e436c27 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 13 Feb 2025 15:55:03 +0100 Subject: better fix --- php-8.0.30-proto.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++ php.spec | 3 ++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/php-8.0.30-proto.patch b/php-8.0.30-proto.patch index a0c09d1..1e63c23 100644 --- a/php-8.0.30-proto.patch +++ b/php-8.0.30-proto.patch @@ -292,3 +292,50 @@ index f58b4195cc599..78ecc1642cf92 100644 break; case 'f': +From 2068d230d981d7b06b41b87ebc37ab2581b79852 Mon Sep 17 00:00:00 2001 +From: George Peter Banyard +Date: Wed, 12 May 2021 18:54:57 +0100 +Subject: [PATCH] Fix [-Wstrict-prototypes] warning in PCNTL extension + +To achieve this we need to introduce a new wrapper function with +dummy arguments which calls pcntl_signal_dispatch() to respect +the function pointer signature for a tick function. +--- + ext/pcntl/pcntl.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c +index 1e8690ae75144..c116eff7d034a 100644 +--- a/ext/pcntl/pcntl.c ++++ b/ext/pcntl/pcntl.c +@@ -89,7 +89,8 @@ static void pcntl_siginfo_to_zval(int, siginfo_t*, zval*); + #else + static void pcntl_signal_handler(int); + #endif +-static void pcntl_signal_dispatch(); ++static void pcntl_signal_dispatch(void); ++static void pcntl_signal_dispatch_tick_function(int dummy_int, void *dummy_pointer); + static void pcntl_interrupt_function(zend_execute_data *execute_data); + + void php_register_signal_constants(INIT_FUNC_ARGS) +@@ -424,7 +425,7 @@ static PHP_GINIT_FUNCTION(pcntl) + + PHP_RINIT_FUNCTION(pcntl) + { +- php_add_tick_function(pcntl_signal_dispatch, NULL); ++ php_add_tick_function(pcntl_signal_dispatch_tick_function, NULL); + zend_hash_init(&PCNTL_G(php_signal_table), 16, NULL, ZVAL_PTR_DTOR, 0); + PCNTL_G(head) = PCNTL_G(tail) = PCNTL_G(spares) = NULL; + PCNTL_G(async_signals) = 0; +@@ -1385,6 +1386,11 @@ void pcntl_signal_dispatch() + sigprocmask(SIG_SETMASK, &old_mask, NULL); + } + ++static void pcntl_signal_dispatch_tick_function(int dummy_int, void *dummy_pointer) ++{ ++ return pcntl_signal_dispatch(); ++} ++ + /* {{{ Enable/disable asynchronous signal handling and return the old setting. */ + PHP_FUNCTION(pcntl_async_signals) + { diff --git a/php.spec b/php.spec index b4dd485..5c7d361 100644 --- a/php.spec +++ b/php.spec @@ -1188,7 +1188,7 @@ scripts/dev/genfiles touch configure.ac ./buildconf --force -CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign -Wno-incompatible-pointer-types" +CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign" export CFLAGS # Install extension modules in %{_libdir}/php/modules. @@ -1919,6 +1919,7 @@ EOF %changelog * Thu Feb 13 2025 Remi Collet - 8.0.30-12 - backport fix for ICU 74+ +- backport fix strict prototypes * Wed Nov 27 2024 Remi Collet - 8.0.30-11 - Fix Leak partial content of the heap through heap buffer over-read -- cgit