git » libfiu » commit e119562

preload: sync_file_range() uses off_t instead of off64_t

author Alberto Bertogli
2024-06-16 10:34:07 UTC
committer Alberto Bertogli
2024-06-28 17:24:19 UTC
parent 724df7e428eea8cb5966b80ef0e765bb4996f3b1

preload: sync_file_range() uses off_t instead of off64_t

The signature of sync_file_range() should be off_t, not off64_t; since
there is an expectation that _FILE_OFFSET_BITS == 64.

preload/posix/modules/linux.io.mod +3 -3

diff --git a/preload/posix/modules/linux.io.mod b/preload/posix/modules/linux.io.mod
index 63f2246..5a6ac83 100644
--- a/preload/posix/modules/linux.io.mod
+++ b/preload/posix/modules/linux.io.mod
@@ -4,10 +4,10 @@ include: <errno.h>
 
 fiu name base: linux/io/
 
-# sync_file_range() is linux-only
-v: #ifdef __linux__
+# sync_file_range() is linux-only, and depends on _FILE_OFFSET_BITS==64.
+v: #if defined __linux__ && _FILE_OFFSET_BITS == 64
 
-int sync_file_range(int fd, off64_t offset, off64_t nbytes, \
+int sync_file_range(int fd, off_t offset, off_t nbytes, \
 		unsigned int flags);
 	on error: -1
 	valid errnos: EBADF EINVAL EIO ENOMEM ENOSPC