tools/nolibc: open files with O_LARGEFILE

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
This commit is contained in:
Thomas Weißschuh
2026-04-18 12:20:01 +02:00
parent 02937a241c
commit ce7677458e

View 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;