@@ -34,7 +34,11 @@ __clock_gettime64 (clockid_t clock_id, struct __timespec64 *tp)
#ifdef __ASSUME_TIME64_SYSCALLS
/* 64 bit ABIs or Newer 32-bit ABIs that only support 64-bit time_t. */
# ifdef __NR_clock_gettime64
- r = INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp);
+# ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
+ r = INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
+# endif
+ if (r == -1)
+ r = INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp);
# else
# ifdef HAVE_CLOCK_GETTIME_VSYSCALL
r = INLINE_VSYSCALL (clock_gettime, 2, clock_id, tp);
@@ -45,7 +49,11 @@ __clock_gettime64 (clockid_t clock_id, struct __timespec64 *tp)
#else
/* Old 32-bit ABI with possible 64-bit time_t support. */
# ifdef __NR_clock_gettime64
- r = INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp);
+# ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
+ r = INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
+# endif
+ if (r == -1)
+ r = INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp);
# endif
if (r == -1)
{
@@ -45,6 +45,10 @@
PROCINFO_CLASS int (*_dl_vdso_clock_gettime) (clockid_t,
struct timespec *) RELRO;
#endif
+# ifdef HAVE_CLOCK_GETTIME_VSYSCALL
+PROCINFO_CLASS int (*_dl_vdso_clock_gettime64) (clockid_t,
+ struct __timespec64 *) RELRO;
+#endif
# ifdef HAVE_GETTIMEOFDAY_VSYSCALL
PROCINFO_CLASS int (*_dl_vdso_gettimeofday) (struct timeval *, void *) RELRO;
#endif
@@ -26,6 +26,9 @@ setup_vdso_pointers (void)
#ifdef HAVE_CLOCK_GETTIME_VSYSCALL
GLRO(dl_vdso_clock_gettime) = dl_vdso_vsym (HAVE_CLOCK_GETTIME_VSYSCALL);
#endif
+#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
+ GLRO(dl_vdso_clock_gettime64) = dl_vdso_vsym (HAVE_CLOCK_GETTIME64_VSYSCALL);
+#endif
#ifdef HAVE_GETTIMEOFDAY_VSYSCALL
GLRO(dl_vdso_gettimeofday) = dl_vdso_vsym (HAVE_GETTIMEOFDAY_VSYSCALL);
#endif