about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/lseek.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/lseek.c')
-rw-r--r--sysdeps/mach/hurd/lseek.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sysdeps/mach/hurd/lseek.c b/sysdeps/mach/hurd/lseek.c
index 7b4e1289b2..0fe20e2a17 100644
--- a/sysdeps/mach/hurd/lseek.c
+++ b/sysdeps/mach/hurd/lseek.c
@@ -18,6 +18,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <errno.h>
+#include <hurd.h>
 
 /* Seek to OFFSET on FD, starting from WHENCE.  */
 off_t
@@ -27,10 +28,7 @@ __libc_lseek (int fd, off_t offset, int whence)
   off_t res = (off_t) res64;
 
   if (sizeof res != sizeof res64 && res != res64)
-    {
-      __set_errno (EOVERFLOW);
-      return (off_t) -1;
-    }
+    return (off_t) __hurd_fail (EOVERFLOW);
 
   return res;
 }