about summary refs log tree commit diff
path: root/sysdeps/posix/preadv2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/preadv2.c')
-rw-r--r--sysdeps/posix/preadv2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/posix/preadv2.c b/sysdeps/posix/preadv2.c
index d29147608f..4f8557ac83 100644
--- a/sysdeps/posix/preadv2.c
+++ b/sysdeps/posix/preadv2.c
@@ -33,7 +33,10 @@ preadv2 (int fd, const struct iovec *vector, int count, off_t offset,
       return -1;
     }
 
-  return preadv (fd, vector, count, offset);
+  if (offset == -1)
+    return __readv (fd, vector, count);
+  else
+    return preadv (fd, vector, count, offset);
 }
 
 #endif