From 105d8f9f2e91f3e49e7d0d0cbe6936ba2aedecc3 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sat, 22 Nov 2025 13:54:42 +0100 Subject: [PATCH] package/time: fix build with newer gcc Fixes: https://autobuild.buildroot.net/results/2d4/2d440a31fc49366d77289f1d21080e1861c6ee21/ Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain (cherry picked from commit 08a638d49ffb956e759f1b3950dd2b11f6fea483) Signed-off-by: Thomas Perale --- ...ime-fix-sighandler-prototype-for-C23.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package/time/0001-time-fix-sighandler-prototype-for-C23.patch diff --git a/package/time/0001-time-fix-sighandler-prototype-for-C23.patch b/package/time/0001-time-fix-sighandler-prototype-for-C23.patch new file mode 100644 index 0000000000..8d4e1d7033 --- /dev/null +++ b/package/time/0001-time-fix-sighandler-prototype-for-C23.patch @@ -0,0 +1,35 @@ +From 218cd7ce34b6dbc86c80f1c781639ea7661d1252 Mon Sep 17 00:00:00 2001 +From: Marcin Serwin +Date: Thu, 2 Oct 2025 19:30:12 +0200 +Subject: [PATCH] time: fix sighandler prototype for C23 + +In C23 functions with empty argument list in the prototype are treated +as taking no arguments. This means that the `int` argument of the +sighandler must be specified explicitly or the code will fail to +compile due to mismatched function type. + +Signed-off-by: Marcin Serwin + +Upstream: https://lists.gnu.org/archive/html/bug-time/2025-10/msg00000.html + +Signed-off-by: Bernd Kuhls +--- + src/time.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/time.c b/src/time.c +index 7b401bc..88287dd 100644 +--- a/src/time.c ++++ b/src/time.c +@@ -77,7 +77,7 @@ enum + + + /* A Pointer to a signal handler. */ +-typedef RETSIGTYPE (*sighandler) (); ++typedef RETSIGTYPE (*sighandler) (int); + + /* msec = milliseconds = 1/1,000 (1*10e-3) second. + usec = microseconds = 1/1,000,000 (1*10e-6) second. */ +-- +2.47.3 +