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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/fxstat.c b/sysdeps/unix/sysv/linux/i386/fxstat.c
index 2f7a8fe93e..646d616c60 100644
--- a/sysdeps/unix/sysv/linux/i386/fxstat.c
+++ b/sysdeps/unix/sysv/linux/i386/fxstat.c
@@ -42,10 +42,12 @@ __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 (-result);
+    else
+      return __xstat32_conv (vers, &buf64, buf);
   }
 }