From 423e49023eeb9b93dcf335d7b03e86a44e584dc8 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Fri, 10 May 2019 07:23:53 -0700 Subject: 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 --- libc/sysdeps/linux/common/preadv.c | 2 +- libc/sysdeps/linux/common/pwritev.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libc') diff --git a/libc/sysdeps/linux/common/preadv.c b/libc/sysdeps/linux/common/preadv.c index fd9dde4b9..6a07d5df8 100644 --- a/libc/sysdeps/linux/common/preadv.c +++ b/libc/sysdeps/linux/common/preadv.c @@ -21,7 +21,7 @@ #ifdef __NR_preadv ssize_t -preadv (int fd, const struct iovec *vector, int count, off_t offset) +preadv (int fd, const struct iovec *vector, int count, __off64_t offset) { unsigned long pos_l, pos_h; diff --git a/libc/sysdeps/linux/common/pwritev.c b/libc/sysdeps/linux/common/pwritev.c index bef5bcf69..f07c40e6d 100644 --- a/libc/sysdeps/linux/common/pwritev.c +++ b/libc/sysdeps/linux/common/pwritev.c @@ -21,7 +21,7 @@ #ifdef __NR_pwritev ssize_t -pwritev (int fd, const struct iovec *vector, int count, off_t offset) +pwritev (int fd, const struct iovec *vector, int count, __off64_t offset) { unsigned long pos_l, pos_h; -- cgit v1.2.3