From 68af3fdf1111057ffded03ec7820303124b7fabf Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Wed, 10 Jul 2002 20:43:17 +0000 Subject: [PATCH] STABLE12-solaris-9-support-20020611 update hrestime interface (cherry picked from commit 9c29a6ead1730649ca501c85482288c73e99f693) --- src/afs/SOLARIS/osi_machdep.h | 12 ++++++++++++ src/rx/rx_clock.c | 4 ++++ src/rx/rx_event.c | 4 ++++ src/rxkad/rxkad_common.c | 4 ++++ 4 files changed, 24 insertions(+) diff --git a/src/afs/SOLARIS/osi_machdep.h b/src/afs/SOLARIS/osi_machdep.h index ef27ae516..0f71fa02b 100644 --- a/src/afs/SOLARIS/osi_machdep.h +++ b/src/afs/SOLARIS/osi_machdep.h @@ -39,7 +39,19 @@ * Time related macros */ #define afs_hz hz +#ifdef AFS_SUN59_ENV +#define osi_Time() local_osi_Time() +extern void gethrestime(timespec_t *); +static int +local_osi_Time() +{ + timespec_t start; + gethrestime(&start); + return start.tv_sec; +} +#else #define osi_Time() (hrestime.tv_sec) +#endif #undef afs_osi_Alloc_NoSleep extern void *afs_osi_Alloc_NoSleep(size_t size); diff --git a/src/rx/rx_clock.c b/src/rx/rx_clock.c index 5d94973a6..dc92b06f4 100644 --- a/src/rx/rx_clock.c +++ b/src/rx/rx_clock.c @@ -17,6 +17,10 @@ #endif #include +#ifdef AFS_SUN59_ENV +#include +#endif + RCSID("$Header$"); #ifdef KERNEL diff --git a/src/rx/rx_event.c b/src/rx/rx_event.c index fd83ee104..f117b12b8 100644 --- a/src/rx/rx_event.c +++ b/src/rx/rx_event.c @@ -14,6 +14,10 @@ #include #endif +#ifdef AFS_SUN59_ENV +#include +#endif + RCSID("$Header$"); #ifdef KERNEL diff --git a/src/rxkad/rxkad_common.c b/src/rxkad/rxkad_common.c index 7f7aab4b8..6d24c0ff4 100644 --- a/src/rxkad/rxkad_common.c +++ b/src/rxkad/rxkad_common.c @@ -16,6 +16,10 @@ #include #endif +#ifdef AFS_SUN59_ENV +#include +#endif + RCSID("$Header$"); #ifdef KERNEL -- 2.39.5