diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/timespec_get.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/timespec_get.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/sysdeps/unix/sysv/linux/timespec_get.c b/sysdeps/unix/sysv/linux/timespec_get.c index 25616493cd..0e5f513f3d 100644 --- a/sysdeps/unix/sysv/linux/timespec_get.c +++ b/sysdeps/unix/sysv/linux/timespec_get.c @@ -18,31 +18,21 @@ #include <time.h> #include <sysdep.h> -#ifndef HAVE_CLOCK_GETTIME_VSYSCALL -# undef INTERNAL_VSYSCALL -# define INTERNAL_VSYSCALL INTERNAL_SYSCALL -#else -# include <libc-vdso.h> +#ifdef HAVE_CLOCK_GETTIME_VSYSCALL +# define HAVE_VSYSCALL #endif - -#ifndef INTERNAL_GETTIME -# define INTERNAL_GETTIME(id, tp) \ - INTERNAL_VSYSCALL (clock_gettime, err, 2, id, tp) -#endif - +#include <sysdep-vdso.h> /* Set TS to calendar time based in time base BASE. */ int -timespec_get (ts, base) - struct timespec *ts; - int base; +timespec_get (struct timespec *ts, int base) { switch (base) { int res; INTERNAL_SYSCALL_DECL (err); case TIME_UTC: - res = INTERNAL_GETTIME (CLOCK_REALTIME, ts); + res = INTERNAL_VSYSCALL (clock_gettime, err, 2, CLOCK_REALTIME, ts); if (INTERNAL_SYSCALL_ERROR_P (res, err)) return 0; break; |