]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/nolibc: open files with O_LARGEFILE
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 18 Apr 2026 10:20:01 +0000 (12:20 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 27 Apr 2026 18:09:12 +0000 (20:09 +0200)
nolibc can natively handle large files. Tell this to the kernel by
always using O_LARGEFILE when opening files. This is also how other
libcs do it.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://patch.msgid.link/20260418-nolibc-largefile-v1-6-b91f0775bac3@weissschuh.net
tools/include/nolibc/fcntl.h

index 56650a36f85693ffcb47b0f0674bc3d0497bad37..014910a8e928de44e944d95b65b5e2174a23d550 100644 (file)
@@ -29,6 +29,8 @@ int openat(int dirfd, const char *path, int flags, ...)
 {
        mode_t mode = 0;
 
+       flags |= O_LARGEFILE;
+
        if (flags & O_CREAT) {
                va_list args;
 
@@ -55,6 +57,8 @@ int open(const char *path, int flags, ...)
 {
        mode_t mode = 0;
 
+       flags |= O_LARGEFILE;
+
        if (flags & O_CREAT) {
                va_list args;