From d41bed3ce0c9138608269631ba65ae782108669a Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Tue, 13 Mar 2018 11:37:02 -0700 Subject: [PATCH] As with gettimeofday, avoid vdso for clang-compiled time() --- sysdeps/unix/sysv/linux/x86/time.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/x86/time.c b/sysdeps/unix/sysv/linux/x86/time.c index d19cccd6f6..124bd967e1 100644 --- a/sysdeps/unix/sysv/linux/x86/time.c +++ b/sysdeps/unix/sysv/linux/x86/time.c @@ -18,7 +18,8 @@ #include -#ifdef SHARED +/* Clang ifunc support works, but differently enough that this code breaks. */ +#if defined(SHARED) && !defined(__clang__) #include #include @@ -57,3 +58,5 @@ time (time_t *t) } #endif + +libc_hidden_weak (time)