1
0
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:
Florian Weimer
2018-02-02 10:46:26 +01:00
parent 84c94d2fd9
commit d4b4a00a46
13 changed files with 103 additions and 15 deletions

View File

@ -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