@@ -33,7 +33,11 @@ __clock_getres64 (clockid_t clock_id, struct __timespec64 *res)
#ifdef __ASSUME_TIME64_SYSCALLS
/* 64 bit ABIs or Newer 32-bit ABIs that only support 64-bit time_t. */
# ifdef __NR_clock_getres_time64
- r = INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res);
+# ifdef HAVE_CLOCK_GETRES64_VSYSCALL
+ r = INLINE_VSYSCALL (clock_getres64, 2, clock_id, tp)
+# endif
+ if (r == -1)
+ r = INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res);
# else
# ifdef HAVE_CLOCK_GETRES_VSYSCALL
r = INLINE_VSYSCALL (clock_getres, 2, clock_id, res);
@@ -44,7 +48,11 @@ __clock_getres64 (clockid_t clock_id, struct __timespec64 *res)
#else
/* Old 32-bit ABI with possible 64-bit time_t support. */
# ifdef __NR_clock_getres_time64
- r = INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res);
+# ifdef HAVE_CLOCK_GETRES64_VSYSCALL
+ r = INLINE_VSYSCALL (clock_getres64, 2, clock_id, tp)
+# endif
+ if (r == -1)
+ r = INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res);
# endif
if (r == -1)
{
@@ -62,6 +62,10 @@ PROCINFO_CLASS int (*_dl_vdso_getcpu) (unsigned *, unsigned *, void *) RELRO;
PROCINFO_CLASS int (*_dl_vdso_clock_getres) (clockid_t,
struct timespec *) RELRO;
# endif
+# ifdef HAVE_CLOCK_GETRES64_VSYSCALL
+PROCINFO_CLASS int (*_dl_vdso_clock_getres64) (clockid_t,
+ struct __timespec64 *) RELRO;
+# endif
/* PowerPC specific ones. */
# ifdef HAVE_GET_TBFREQ
@@ -41,6 +41,9 @@ setup_vdso_pointers (void)
#ifdef HAVE_CLOCK_GETRES_VSYSCALL
GLRO(dl_vdso_clock_getres) = dl_vdso_vsym (HAVE_CLOCK_GETRES_VSYSCALL);
#endif
+#ifdef HAVE_CLOCK_GETRES64_VSYSCALL
+ GLRO(dl_vdso_clock_getres64) = dl_vdso_vsym (HAVE_CLOCK_GETRES64_VSYSCALL);
+#endif
#ifdef HAVE_GET_TBFREQ
GLRO(dl_vdso_get_tbfreq) = dl_vdso_vsym (HAVE_GET_TBFREQ);
#endif