From ec138c67cbda8b5826a0a2a7ba456408117996dc Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Mon, 15 Jul 2019 16:30:59 -0700 Subject: sysdeps/clock_gettime: Use clock_gettime64 if avaliable With the clock_gettime64 call we prefer to use vDSO. There is no call to clock_gettime64 on glibc with older headers and kernel 5.1+ if it doesn't support vDSO. Reviewed-by: Adhemerval Zanella --- include/time.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/time.h') diff --git a/include/time.h b/include/time.h index d7800eb..c19c73a 100644 --- a/include/time.h +++ b/include/time.h @@ -211,11 +211,14 @@ extern double __difftime (time_t time1, time_t time0); #if __TIMESIZE == 64 # define __clock_nanosleep_time64 __clock_nanosleep +# define __clock_gettime64 __clock_gettime #else extern int __clock_nanosleep_time64 (clockid_t clock_id, int flags, const struct __timespec64 *req, struct __timespec64 *rem); libc_hidden_proto (__clock_nanosleep_time64) +extern int __clock_gettime64 (clockid_t clock_id, struct __timespec64 *tp); +libc_hidden_proto (__clock_gettime64) #endif /* Use in the clock_* functions. Size of the field representing the -- cgit v1.1