summaryrefslogtreecommitdiff
path: root/tools/include
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2026-04-18 12:20:01 +0200
committerThomas Weißschuh <linux@weissschuh.net>2026-04-27 20:09:12 +0200
commitce7677458e680d0742fb7f86c0e27272e4c56205 (patch)
treed71a6b67bd5db5ff5095fe76a66ec375dd465928 /tools/include
parent02937a241c811cd31e052a16c0ea036b5071d052 (diff)
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
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/nolibc/fcntl.h4
1 files changed, 4 insertions, 0 deletions
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;