From aa88949e2e6c78d7789e470a1861240af12a6818 Mon Sep 17 00:00:00 2001 From: Xabilimon1 <237823862+Xabilimon1@users.noreply.github.com> Date: Mon, 12 Oct 2026 17:33:37 +0200 Subject: [PATCH] fix(libkernel): build the fcntl status flags and the getrlimit test on macOS InitialEntry reads O_DIRECT from the host status flags, and macOS has no O_DIRECT, so libkernel did not compile there. It is now read only where the host defines it. GuestGetrlimit iterates over braced lists without including , which libc++ requires. Co-Authored-By: Claude Opus 5.5 --- core/libs/prx/libkernel/File/src/DescriptorControl.cpp | 2 ++ core/libs/tests/GuestGetrlimit.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/core/libs/prx/libkernel/File/src/DescriptorControl.cpp b/core/libs/prx/libkernel/File/src/DescriptorControl.cpp index 7bdd8c8bc..c83b4ba21 100644 --- a/core/libs/prx/libkernel/File/src/DescriptorControl.cpp +++ b/core/libs/prx/libkernel/File/src/DescriptorControl.cpp @@ -246,7 +246,9 @@ Entry InitialEntry(int fd) { if (host & O_APPEND) status |= Append; if (host & O_ASYNC) status |= Asynchronous; if ((host & O_SYNC) == O_SYNC) status |= Synchronous; +#ifdef O_DIRECT if (host & O_DIRECT) status |= Direct; +#endif return {(descriptorFlags & FD_CLOEXEC) != 0, std::make_shared(status)}; } diff --git a/core/libs/tests/GuestGetrlimit.cpp b/core/libs/tests/GuestGetrlimit.cpp index 73b23df87..f597a8021 100644 --- a/core/libs/tests/GuestGetrlimit.cpp +++ b/core/libs/tests/GuestGetrlimit.cpp @@ -1,6 +1,7 @@ #include "prx/libc/include/general/VabiMacros.hpp" #include #include +#include #include #include #ifndef _WIN32