fix(libkernel): build the fcntl status flags and the getrlimit test on macOS #4555
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4555"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Xabilimon1 on 2026-10-12T15:34:48Z.
What
Two pieces of code added to
mainsincemugurc:macos-portwas last re-stacked do not compile on macOS:InitialEntry(DescriptorControl.cpp, from #3840) maps the host'sO_DIRECTto the guest'sDirectstatus flag. The macOS SDK'ssys/fcntl.hhas noO_DIRECT(the closest isF_NOCACHE, anfcntlcommand), so libkernel stops withuse of undeclared identifier 'O_DIRECT'. The flag is now read only where the host defines it. Linux keeps the same code, and the function is compiled only outside_WIN32, so neither Linux nor Windows changes.GuestGetrlimit.cpp(from #3765) iterates over braced lists without including<initializer_list>. libc++ requires it:cannot deduce type of initializer list because std::initializer_list was not found.@mugurc, found while merging
macos-portwithmainfor a test. Two other errors from that merge are not here because they only exist on the branch:WatchMappinginDirectMemory.cppis built on__APPLE__there but usesg_physicalSpans, whichmaindeclares for__linux__only, and the branch's__APPLE__include block inGuestKernelStackProtect.cpphas no<sys/mman.h>, which themmapthatmainadded to that test needs.Tested
macOS 27.0.1, Apple M3, Apple clang 21, x86-64 under Rosetta, on
mugurc:macos-portde3ef5d53merged withmain0ef9dc928:libsfinish, andguest_getrlimitandguest_kernel_fcntlpass.Not built on Linux or Windows; on both the preprocessor keeps the code as it is.
python3 tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-12T15:34:53Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
Imported from boykopovar/AnyPS5. Originally posted by Xabilimon1 on 2026-10-13T08:30:43Z.
Heads-up: #4629 carries the same <initializer_list> hunk in GuestGetrlimit.cpp, byte for byte, so either PR merges cleanly after the other. The O_DIRECT guard in DescriptorControl.cpp is only here; main at
ad653c9bcstill has it unguarded, and the macOS SDK defines no O_DIRECTImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T14:20:46Z.
Checked the diff, build + ctest on the scoped libkernel/libs set (146 tests green,
guest_getrlimitpasses). On LinuxO_DIRECTis defined so the code is unchanged; the file is not compiled on Windows. macOS compilation itself is not something we can run here. Merging.