package/time: fix build with newer gcc
PATCH 1/1 package/time: fix build with newer gcc
Fixes:
https://autobuild.buildroot.net/results/2d4/2d440a31fc49366d77289f1d21080e1861c6ee21/
Signed-off-by Bernd Kuhls <[email protected]>
--- ...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
package/time/0001-time-fix-sighandler-prototype-for-C23.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 218cd7ce34b6dbc86c80f1c781639ea7661d1252 Mon Sep 17 00:00:00 2001 +From: Marcin Serwin <[email protected]> +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 <[email protected]> + +Upstream: https://lists.gnu.org/archive/html/bug-time/2025-10/msg00000.html + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + 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 +
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 4 lines · Bernd Kuhls
Fixes:
https://autobuild.buildroot.net/results/2d4/2d440a31fc49366d77289f1d21080e1861c6ee21/Signed-off-by Bernd Kuhls <[email protected]>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
In reply of:
Quoted 4 lines
Fixes:
https://autobuild.buildroot.net/results/2d4/2d440a31fc49366d77289f1d21080e1861c6ee21/Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2025.08.x. Thanks
Quoted 53 lines
--- ...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.patchpackage/time/0001-time-fix-sighandler-prototype-for-C23.patch new file +35
-0@@ -0,0 +1,35 @@ +From 218cd7ce34b6dbc86c80f1c781639ea7661d1252 Mon Sep 17 00:00:00 2001 +From: Marcin Serwin <[email protected]> +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 <[email protected]> + +Upstream: https://lists.gnu.org/archive/html/bug-time/2025-10/msg00000.html + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + 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 +Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot