about summary refs log tree commit diff
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/fxstat.c b/sysdeps/unix/sysv/linux/i386/fxstat.c
index 646d616c60..d2a2b8d486 100644
--- a/sysdeps/unix/sysv/linux/i386/fxstat.c
+++ b/sysdeps/unix/sysv/linux/i386/fxstat.c
@@ -45,7 +45,8 @@ __fxstat (int vers, int fd, struct stat *buf)
     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 (-result);
+      return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
+									err));
     else
       return __xstat32_conv (vers, &buf64, buf);
   }