From ce7677458e680d0742fb7f86c0e27272e4c56205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Sat, 18 Apr 2026 12:20:01 +0200 Subject: [PATCH] tools/nolibc: open files with O_LARGEFILE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Willy Tarreau Link: https://patch.msgid.link/20260418-nolibc-largefile-v1-6-b91f0775bac3@weissschuh.net --- tools/include/nolibc/fcntl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/include/nolibc/fcntl.h b/tools/include/nolibc/fcntl.h index 56650a36f856..014910a8e928 100644 --- a/tools/include/nolibc/fcntl.h +++ b/tools/include/nolibc/fcntl.h @@ -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;