osi-gettime-20041202
authorJeffrey Hutzelman <jhutz@cmu.edu>
Wed, 1 Dec 2004 23:31:54 +0000 (23:31 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 1 Dec 2004 23:31:54 +0000 (23:31 +0000)
FIXES 16346

osi_GetTime needs to bdeal with 64 bit time on platforms that have it

src/afs/LINUX/osi_machdep.h
src/config/param.amd64_linux26.h

index 038a190..278e56a 100644 (file)
 #define afs_hz HZ
 #include "h/sched.h"
 #define osi_Time() (xtime.tv_sec)
+#ifdef AFS_LINUX_64BIT_KERNEL
+#define osi_GetTime(V)                                 \
+    do {                                               \
+       struct timeval tv;                              \
+       do_gettimeofday(&tv);                           \
+       (V)->tv_sec = (afs_int32)tv.tv_sec;             \
+       (V)->tv_usec = (afs_int32)tv.tv_usec;           \
+    } while (0)
+#else
 #define osi_GetTime(V) do_gettimeofday((V))
+#endif
 
 #undef gop_lookupname
 #define gop_lookupname osi_lookupname
index 9a8444e..ca6b125 100644 (file)
@@ -19,6 +19,7 @@
 #define AFS_AMD64_LINUX22_ENV   1
 #define AFS_AMD64_LINUX24_ENV   1
 #define AFS_AMD64_LINUX26_ENV   1
+#define AFS_LINUX_64BIT_KERNEL 1
 #define AFS_NONFSTRANS 1
 
 #define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */