Files
buildroot/package/ntp/0006-stime.patch
2025-07-20 11:54:06 +02:00

22 lines
699 B
Diff

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 <bernd@kuhls.net>
--- 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 */