Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/nolibc: use 64-bit off_t

The kernel uses 64-bit values for file offsets.
Currently these might be truncated to 32-bit when assigned to
nolibc's off_t values.

Switch to 64-bit off_t consistently.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/lkml/cec27d94-c99d-4c57-9a12-275ea663dda8@app.fastmail.com/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>

+1 -1
+1 -1
tools/include/nolibc/std.h
··· 26 26 typedef unsigned int uid_t; 27 27 typedef unsigned int gid_t; 28 28 typedef unsigned long nlink_t; 29 - typedef signed long off_t; 29 + typedef int64_t off_t; 30 30 typedef signed long blksize_t; 31 31 typedef signed long blkcnt_t; 32 32 typedef __kernel_time_t time_t;