From fa1c1f83eb09eae8de0404ce3c5a6079c5e76b53 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sun, 6 Jul 2025 08:44:15 +0200 Subject: [PATCH] package/ntp: fix build with gcc-14 Fixes: https://autobuild.buildroot.org/results/114/114a81f216b44a00c5de830e21315df68a62987d/ Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain (cherry picked from commit 526ab2f6c048b06faf1ae5045058a8b26728fcd7) Signed-off-by: Thomas Perale --- package/ntp/0006-stime.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 package/ntp/0006-stime.patch diff --git a/package/ntp/0006-stime.patch b/package/ntp/0006-stime.patch new file mode 100644 index 0000000000..7707231cf8 --- /dev/null +++ b/package/ntp/0006-stime.patch @@ -0,0 +1,21 @@ +Fix stime build error with gcc-14: + +machines.c: In function 'ntp_set_tod': +machines.c:484:28: error: passing argument 1 of 'stime' from incompatible pointer type [-Wincompatible-pointer-types] + 484 | rc = stime(&tp); /* lie as bad as SysVR4 */ + +Upstream: https://bugs.ntp.org/show_bug.cgi?id=3981#c2 + +Signed-off-by: Bernd Kuhls + +--- a/libntp/machines.c 2025-05-26 18:21:43 +0000 ++++ a/libntp/machines.c 2025-05-26 18:21:43 +0000 +@@ -478,7 +478,7 @@ + #endif /* HAVE_SETTIMEOFDAY */ + #ifdef HAVE_STIME + if (rc && (SET_TOD_STIME == tod || !tod)) { +- long tp = tvp->tv_sec; ++ time_t tp = tvp->tv_sec; + + errno = 0; + rc = stime(&tp); /* lie as bad as SysVR4 */