openbsd-ports/net/ntp/patches/patch-ntpd_refclock_shm_c
2004-06-05 04:34:19 +00:00

22 lines
652 B
Plaintext

$OpenBSD: patch-ntpd_refclock_shm_c,v 1.1.1.1 2004/06/05 04:34:19 danh Exp $
--- ntpd/refclock_shm.c.orig 2004-02-25 00:58:16.000000000 -0500
+++ ntpd/refclock_shm.c 2004-06-04 14:29:25.000000000 -0400
@@ -222,6 +222,7 @@ shm_poll(
{
register struct shmTime *up;
struct refclockproc *pp;
+ time_t tsec;
/*
* This is the main routine. It snatches the time from the shm
@@ -270,7 +271,8 @@ shm_poll(
pp->lastrec.l_ui += JAN_1970;
/* pp->lasttime = current_time; */
pp->polls++;
- t=gmtime (&tvt.tv_sec);
+ tsec = tvt.tv_sec;
+ t = gmtime (&tsec);
pp->day=t->tm_yday+1;
pp->hour=t->tm_hour;
pp->minute=t->tm_min;