summaryrefslogtreecommitdiff
path: root/usr.sbin/rwhod
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/rwhod')
-rw-r--r--usr.sbin/rwhod/rwhod.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c
index 61b6c8288a5..a85e6cbca07 100644
--- a/usr.sbin/rwhod/rwhod.c
+++ b/usr.sbin/rwhod/rwhod.c
@@ -219,6 +219,7 @@ handleread(int s)
char path[64];
struct whod wd;
int cc, whod;
+ time_t t;
socklen_t len = sizeof(from);
cc = recvfrom(s, (char *)&wd, sizeof(struct whod), 0,
@@ -280,7 +281,8 @@ handleread(int s)
}
}
#endif
- (void) time((time_t *)&wd.wd_recvtime);
+ (void) time(&t);
+ wd.wd_recvtime = t; /* XXX protocol breaks in 2038 */
(void) write(whod, (char *)&wd, cc);
if (fstat(whod, &st) < 0 || st.st_size > cc)
ftruncate(whod, (off_t)cc);