fix(libkernel): include link.h only on Linux in the dynamic loader test #22074
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22074"
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 kurexw on 2026-11-17T03:55:18Z.
What
#16922 added
#include <link.h>tocore/libs/tests/GuestDynamicLoader.cppin the non-Windows branch. macOS has no<link.h>, soguest_dynamic_loader_testsdoesn't compile there:The only code that uses the header (
dl_iterate_phdrin the program-image check) is already inside#ifdef __linux__. This PR puts the include under the same#ifdef __linux__, inside the non-Windows branch. Linux still compiles the same code, and nothing else changes.Tested
macOS 27.2 on an Apple M4, with Apple clang for an x86-64 build under Rosetta.
mainatd642b4efee, the file fails with the error above.ninja guest_dynamic_loader_testsbuilds.ctest -R '^guest_dynamic_loader$'passed in three runs out of three. The Linux-only program-image check isn't compiled on macOS, so it didn't run.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T04:00:46Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
ccc9633adb:tools/check_conventions.pypassed.guest_dynamic_loader_fixed_base_tests,guest_dynamic_loader_testsbuilt cleanly.guest_dynamic_loader,guest_dynamic_loader_fixed_base):Looks Good To Me