Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/am-utils/hlfsd Fix an LP64 bug-- "timeval" and "nfstime...



details:   https://anonhg.NetBSD.org/src/rev/4d0898d342bb
branches:  trunk
changeset: 540173:4d0898d342bb
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Dec 06 03:57:24 2002 +0000

description:
Fix an LP64 bug-- "timeval" and "nfstime" are NOT equivalent on
NetBSD!

diffstat:

 dist/am-utils/hlfsd/hlfsd.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r eb50fb983ea9 -r 4d0898d342bb dist/am-utils/hlfsd/hlfsd.c
--- a/dist/am-utils/hlfsd/hlfsd.c       Fri Dec 06 03:50:35 2002 +0000
+++ b/dist/am-utils/hlfsd/hlfsd.c       Fri Dec 06 03:57:24 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hlfsd.c,v 1.4 2002/11/29 23:06:25 christos Exp $       */
+/*     $NetBSD: hlfsd.c,v 1.5 2002/12/06 03:57:24 thorpej Exp $        */
 
 /*
  * Copyright (c) 1997-2002 Erez Zadok
@@ -750,7 +750,12 @@
   if (setitimer(ITIMER_REAL, &reloadinterval, (struct itimerval *) 0) < 0)
     fatal("setitimer: %m");
 
-  gettimeofday((struct timeval *) &startup, (struct timezone *) 0);
+  {
+    struct timeval start_time;
+    gettimeofday((void *) &startup, (struct timezone *) 0);
+    startup.nt_seconds = (u_int) start_time.tv_sec;
+    startup.nt_useconds = (u_int) start_time.tv_usec;
+  }
 
 #ifdef DEBUG
   /*



Home | Main Index | Thread Index | Old Index