summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-04-22 15:53:59 +0000
committerUlrich Drepper <drepper@redhat.com>2008-04-22 15:53:59 +0000
commit7eb5e6c9bdea71dc831862c5956d0bab08d92125 (patch)
tree93fcee1b23d1814aed6b7f87e3b80cf863e9a1df /sysdeps
parent0073dd2d49c6c8a2a4b82f71b2172fe361dac26a (diff)
* nscd/Makefile (nscd-cflags): Set back to -fpie.
* nscd/nscd.h (mem_in_flight): Add attribute_tls_model_ie. * nscd/connections.c (mem_in_flight): Likewise. * nscd/nscd.h (dbs): Make hidden. * sysdeps/unix/sysv/linux/times.c (__times): Fix check for EFAULT. Avoid returning -1, return 0 instead.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/times.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/times.c b/sysdeps/unix/sysv/linux/times.c
index 2759683b0b..42d265dc87 100644
--- a/sysdeps/unix/sysv/linux/times.c
+++ b/sysdeps/unix/sysv/linux/times.c
@@ -27,7 +27,7 @@ __times (struct tms *buf)
INTERNAL_SYSCALL_DECL (err);
clock_t ret = INTERNAL_SYSCALL (times, err, 1, buf);
if (INTERNAL_SYSCALL_ERROR_P (ret, err)
- && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == -EFAULT, 0))
+ && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == EFAULT, 0))
{
/* This might be an error or not. For architectures which have
no separate return value and error indicators we cannot
@@ -49,6 +49,11 @@ __times (struct tms *buf)
return an EFAULT error. Return the value given by the kernel. */
}
+ /* Return value (clock_t) -1 signals an error, but if there wasn't any,
+ return the following value. */
+ if (ret == (clock_t) -1)
+ return (clock_t) 0;
+
return ret;
}
weak_alias (__times, times)