aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/preadv64v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/preadv64v2.c')
-rw-r--r--sysdeps/unix/sysv/linux/preadv64v2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/preadv64v2.c b/sysdeps/unix/sysv/linux/preadv64v2.c
index 58f7848352..d7400a0252 100644
--- a/sysdeps/unix/sysv/linux/preadv64v2.c
+++ b/sysdeps/unix/sysv/linux/preadv64v2.c
@@ -47,7 +47,11 @@ preadv64v2 (int fd, const struct iovec *vector, int count, off64_t offset,
__set_errno (ENOTSUP);
return -1;
}
- return preadv64 (fd, vector, count, offset);
+
+ if (offset == -1)
+ return __readv (fd, vector, count);
+ else
+ return preadv64 (fd, vector, count, offset);
}
#ifdef __OFF_T_MATCHES_OFF64_T