aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2011-11-15 15:04:26 +0100
committerAndreas Schwab <schwab@redhat.com>2011-11-15 15:17:15 +0100
commit446514f97eaf555200f9ec4f369223f984e638a5 (patch)
tree2dd24107d610a0bdff14fc01a0ded3ffb0b7adf9 /sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
parenta501a01e069619676990454abd43c4d2bf4527f4 (diff)
downloadglibc-446514f97eaf555200f9ec4f369223f984e638a5.tar
glibc-446514f97eaf555200f9ec4f369223f984e638a5.tar.gz
glibc-446514f97eaf555200f9ec4f369223f984e638a5.tar.bz2
glibc-446514f97eaf555200f9ec4f369223f984e638a5.zip
Fix clock_gettime for assumed kernel >= 2.6.12
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86_64/clock_gettime.c')
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/clock_gettime.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
index 7802701e22..f7121106bc 100644
--- a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
+++ b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
@@ -3,8 +3,14 @@
#ifdef SHARED
# define SYSCALL_GETTIME(id, tp) \
({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
+ long int v_ret; \
PTR_DEMANGLE (f); \
- f (id, tp); })
+ v_ret = f (id, tp); \
+ if (INTERNAL_SYSCALL_ERROR_P (v_ret, )) { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (v_ret, )); \
+ v_ret = -1; \
+ } \
+ v_ret; })
# define INTERNAL_GETTIME(id, tp) \
({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
PTR_DEMANGLE (f); \