Skip to contentSkip to conversation

package/time: fix build with newer gcc

PATCH Applied Bernd Kuhls 2 participants 3 messages Nov 22, 2025 – Dec 11, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/time: fix build with newer gcc

Fixes:
https://autobuild.buildroot.net/results/2d4/2d440a31fc49366d77289f1d21080e1861c6ee21/

---
 ...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
new file mode 100644
index 0000000000..8d4e1d7033
@@ -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
#2 lore raw
In reply to Bernd Kuhls

In reply of:

Quoted 4 lines

Fixes:
https://autobuild.buildroot.net/results/2d4/2d440a31fc49366d77289f1d21080e1861c6ee21/

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.patch
package/time/0001-time-fix-sighandler-prototype-for-C23.patch new file +35 -0
new file mode 100644
index 0000000000..8d4e1d7033
@@ -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