mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
preadv2/pwritev2: Handle offset == -1 [BZ #22753]
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@ -45,7 +45,10 @@ pwritev2 (int fd, const struct iovec *vector, int count, off_t offset,
|
||||
__set_errno (ENOTSUP);
|
||||
return -1;
|
||||
}
|
||||
return pwritev (fd, vector, count, offset);
|
||||
if (offset == -1)
|
||||
return __writev (fd, vector, count);
|
||||
else
|
||||
return pwritev (fd, vector, count, offset);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user