[PATCH 6/7] tools/nolibc: open files with O_LARGEFILE
From: Thomas Weißschuh
Date: Sat Apr 18 2026 - 06:27:18 EST
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@xxxxxxxxxxxxxx>
---
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 ed2f5553c65a..235f7c92fba2 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;
--
2.53.0