Repository navigation
fix(libkernel): build FillStatfs's macOS branch - #17888
AasishDairelSahayaGrinspan wants to merge 1 commit into
Conversation
The macOS branch of FillStatfs read a descriptor parameter the function never received, so the full macOS build of libkernel did not compile; the Linux and Windows branches compiled and CI builds macOS only as the relinker, so the break went unnoticed. FillStatfs now fills only the statvfs-derived fields on every host, and the macOS MNT_NOEXEC lookup moved to its two callers: NativeFstatfs asks fstatfs for the descriptor it already holds, and NativeStatfs asks statfs for the path it stats. Co-Authored-By: GLM <noreply@z.ai>
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Closing in favor of #17767, which fixes the same macOS |
What
The macOS branch of
FillStatfs(added with the fstatfs work) read adescriptorparameter the function never receives, so the full macOS build oflibkernelhas not compiled; the Linux and Windows branches compile, and CI builds macOS only as the relinker, which is why the break went unnoticed.FillStatfsnow fills only thestatvfs-derived fields on every host, and the macOSMNT_NOEXEClookup moved to its two callers:NativeFstatfsasksfstatfsfor the descriptor it already holds, andNativeStatfsasksstatfsfor the path it stats. Non-Apple hosts keep theST_NOEXECfield read insideFillStatfs, so their behavior is unchanged.Tested
macOS 15 (arm64 host, x86_64 target via the Rosetta toolchain), Apple Clang, Release,
BUILD_TESTING=ON:core/libs/prx/libkernel/File/src/Stdio.cppfails to compile onmain(use of undeclared identifier 'descriptor').libkernelbuilds andctest --test-dir build -R guest_fstatfs -Vpasses.python3 tools/check_conventions.py --base origin/main: passed.Linux and Windows were not compiled here; the change is guarded by
__APPLE__around code those hosts never compile, and CI covers them.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)