diff options
Diffstat (limited to 'sysdeps/posix/preadv2.c')
-rw-r--r-- | sysdeps/posix/preadv2.c | 5 |
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 |