0006-stime.patch 699 B

123456789101112131415161718192021
  1. Fix stime build error with gcc-14:
  2. machines.c: In function 'ntp_set_tod':
  3. machines.c:484:28: error: passing argument 1 of 'stime' from incompatible pointer type [-Wincompatible-pointer-types]
  4. 484 | rc = stime(&tp); /* lie as bad as SysVR4 */
  5. Upstream: https://bugs.ntp.org/show_bug.cgi?id=3981#c2
  6. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
  7. --- a/libntp/machines.c 2025-05-26 18:21:43 +0000
  8. +++ a/libntp/machines.c 2025-05-26 18:21:43 +0000
  9. @@ -478,7 +478,7 @@
  10. #endif /* HAVE_SETTIMEOFDAY */
  11. #ifdef HAVE_STIME
  12. if (rc && (SET_TOD_STIME == tod || !tod)) {
  13. - long tp = tvp->tv_sec;
  14. + time_t tp = tvp->tv_sec;
  15. errno = 0;
  16. rc = stime(&tp); /* lie as bad as SysVR4 */