summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386/fxstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/fxstat.c')
-rw-r--r--sysdeps/unix/sysv/linux/i386/fxstat.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/fxstat.c b/sysdeps/unix/sysv/linux/i386/fxstat.c
index 2f7a8fe93e..c1a7613ca7 100644
--- a/sysdeps/unix/sysv/linux/i386/fxstat.c
+++ b/sysdeps/unix/sysv/linux/i386/fxstat.c
@@ -1,5 +1,5 @@
/* fxstat using old-style Unix fstat system call.
- Copyright (C) 1991-2015 Free Software Foundation, Inc.
+ Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,10 +42,13 @@ __fxstat (int vers, int fd, struct stat *buf)
{
struct stat64 buf64;
- result = INLINE_SYSCALL (fstat64, 2, fd, &buf64);
- if (result == 0)
- result = __xstat32_conv (vers, &buf64, buf);
- return result;
+ INTERNAL_SYSCALL_DECL (err);
+ result = INTERNAL_SYSCALL (fstat64, err, 2, fd, &buf64);
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
+ err));
+ else
+ return __xstat32_conv (vers, &buf64, buf);
}
}