]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tools/nolibc: use 64-bit off_t
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 29 Oct 2025 16:02:54 +0000 (17:02 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Thu, 20 Nov 2025 18:46:57 +0000 (19:46 +0100)
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>
tools/include/nolibc/std.h

index eae457d60858908b99fe71abd444a0dfbb73d9f1..392f4dd9415880c9e39fef86138d06650f638f05 100644 (file)
@@ -26,7 +26,7 @@ typedef   signed int          pid_t;
 typedef unsigned int          uid_t;
 typedef unsigned int          gid_t;
 typedef unsigned long       nlink_t;
-typedef   signed long         off_t;
+typedef  int64_t              off_t;
 typedef   signed long     blksize_t;
 typedef   signed long      blkcnt_t;
 typedef __kernel_time_t      time_t;