From 31ac4626175f22aff16fd7eaa1963cf04052d13b Mon Sep 17 00:00:00 2001 From: Jeffrey Hutzelman Date: Tue, 7 Dec 2004 06:09:23 +0000 Subject: [PATCH] STABLE14-osi-gettime-20041202 FIXES 16346 osi_GetTime needs to bdeal with 64 bit time on platforms that have it (cherry picked from commit a8cb095e85fba7ecdeb7bdb7848cfb2f498d5cc8) --- src/afs/LINUX/osi_machdep.h | 10 ++++++++++ src/config/param.amd64_linux26.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h index 038a19040..278e56ae9 100644 --- a/src/afs/LINUX/osi_machdep.h +++ b/src/afs/LINUX/osi_machdep.h @@ -51,7 +51,17 @@ #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 diff --git a/src/config/param.amd64_linux26.h b/src/config/param.amd64_linux26.h index 9a8444e41..ca6b125e8 100644 --- a/src/config/param.amd64_linux26.h +++ b/src/config/param.amd64_linux26.h @@ -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. */ -- 2.39.5