修訂 | 423e49023eeb9b93dcf335d7b03e86a44e584dc8 (tree) |
---|---|
時間 | 2019-05-13 16:11:02 |
作者 | Max Filippov <jcmvbkbc@gmai...> |
Commiter | Waldemar Brodkorb |
preadv/pwritev: fix offset argument type
preadv/pwritev don't provide separate version for 64-bit wide off_t,
and default to 32-bit wide off_t, which results in a mismatch between
declaration and definition for user programs built with
-D_FILE_OFFSET_BITS=64.
Make offset argument of both functions off64_t.
This fixes test misc/tst-preadvwritev on xtensa.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
@@ -59,7 +59,7 @@ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count); | ||
59 | 59 | This function is a cancellation point and therefore not marked with |
60 | 60 | __THROW. */ |
61 | 61 | extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count, |
62 | - off_t __offset) __wur; | |
62 | + __off64_t __offset) __wur; | |
63 | 63 | |
64 | 64 | /* Write data pointed by the buffers described by IOVEC, which is a |
65 | 65 | vector of COUNT 'struct iovec's, to file descriptor FD at the given |
@@ -71,7 +71,7 @@ extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count, | ||
71 | 71 | This function is a cancellation point and therefore not marked with |
72 | 72 | __THROW. */ |
73 | 73 | extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count, |
74 | - off_t __offset) __wur; | |
74 | + __off64_t __offset) __wur; | |
75 | 75 | #endif /* Use misc. */ |
76 | 76 | |
77 | 77 | __END_DECLS |
@@ -21,7 +21,7 @@ | ||
21 | 21 | |
22 | 22 | #ifdef __NR_preadv |
23 | 23 | ssize_t |
24 | -preadv (int fd, const struct iovec *vector, int count, off_t offset) | |
24 | +preadv (int fd, const struct iovec *vector, int count, __off64_t offset) | |
25 | 25 | { |
26 | 26 | unsigned long pos_l, pos_h; |
27 | 27 |
@@ -21,7 +21,7 @@ | ||
21 | 21 | |
22 | 22 | #ifdef __NR_pwritev |
23 | 23 | ssize_t |
24 | -pwritev (int fd, const struct iovec *vector, int count, off_t offset) | |
24 | +pwritev (int fd, const struct iovec *vector, int count, __off64_t offset) | |
25 | 25 | { |
26 | 26 | unsigned long pos_l, pos_h; |
27 | 27 |