fix(libs): build getifaddrs and two tests on macOS hosts #8279

Merged
mugurc merged 1 commit from upstream-pr/8279 into main 2026-10-23 18:31:39 +00:00
mugurc commented 2026-10-20 08:20:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mugurc on 2026-10-20T08:20:15Z.


What

Three recent changes on main use what only Linux has, so libc and two tests no longer compile on macOS. Part of the macOS series announced on #1 (https://github.com/boykopovar/AnyPS5/issues/1#issuecomment-6124344298).

  • #7988: the AF_LINK entries that getifaddrs lists on Linux use linux/if_link.h, netpacket/packet.h, sockaddr_ll and rtnl_link_stats, and were built on every host but Windows. They are now built on Linux only. macOS lists the IPv4 and IPv6 addresses as before, as Windows does, and guest_interfaces checks the AF_LINK entries on Linux only. The debt entry names macOS next to Windows.
  • #8038: GuestNetCtlAp.cpp loops over a braced list without including <initializer_list>, which libc++ does not pull in through the test's other headers.
  • #6457: the import block test backs its 16 KiB views with memfd_create. The views case is now built on Linux only; macOS runs the case without views, as Windows does.

Tested

macOS 26.5.1, Apple M5 Max, Apple clang 21, x86-64 build under Rosetta 2. The libraries do not link on macOS without the rest of the macOS series, so the run is on main 3fd1cc393 with the series (ci/macos-series-2 on my fork), the open macOS fixes #7524 and #7937, and three changes from #7332.

  • Without this PR: Interfaces.cpp fails on linux/if_link.h, GuestInterfaces.cpp on netpacket/packet.h, GuestNetCtlAp.cpp on the braced list and BdaResources.cpp on MFD_CLOEXEC. With it, ninja and ninja libs finish.
  • guest_interfaces, guest_netctl_ap and guest_netctl_ap_dialog pass.
  • ctest -j4: 1648 tests, 1009 passed, 24 failed, the rest skipped (no Vulkan loader in the environment). 22 of the failures were already there in my run on yesterday's base 9127ea36d with the same series, and none of them is in a test this PR touches. guest_path_name_length is new: since #8164 it expects a guest path of exactly 1023 bytes to be accepted, and macOS fails it with ENAMETOOLONG; I have not looked into it yet. patched_libraries timed out in the parallel run and passed when run alone.
  • Linux and Windows: not run. On Linux __linux__ is defined, so the code that is built is the same as before; on Windows nothing changes.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: none; the AGC change only stops building the views case on macOS
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4933023769 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8279). Originally posted by [mugurc](https://github.com/mugurc) on 2026-10-20T08:20:15Z. --- ### What Three recent changes on `main` use what only Linux has, so `libc` and two tests no longer compile on macOS. Part of the macOS series announced on #1 (https://github.com/boykopovar/AnyPS5/issues/1#issuecomment-6124344298). - #7988: the `AF_LINK` entries that `getifaddrs` lists on Linux use `linux/if_link.h`, `netpacket/packet.h`, `sockaddr_ll` and `rtnl_link_stats`, and were built on every host but Windows. They are now built on Linux only. macOS lists the IPv4 and IPv6 addresses as before, as Windows does, and `guest_interfaces` checks the `AF_LINK` entries on Linux only. The debt entry names macOS next to Windows. - #8038: `GuestNetCtlAp.cpp` loops over a braced list without including `<initializer_list>`, which libc++ does not pull in through the test's other headers. - #6457: the import block test backs its 16 KiB views with `memfd_create`. The views case is now built on Linux only; macOS runs the case without views, as Windows does. ### Tested macOS 26.5.1, Apple M5 Max, Apple clang 21, x86-64 build under Rosetta 2. The libraries do not link on macOS without the rest of the macOS series, so the run is on `main` 3fd1cc393 with the series (`ci/macos-series-2` on my fork), the open macOS fixes #7524 and #7937, and three changes from #7332. - Without this PR: `Interfaces.cpp` fails on `linux/if_link.h`, `GuestInterfaces.cpp` on `netpacket/packet.h`, `GuestNetCtlAp.cpp` on the braced list and `BdaResources.cpp` on `MFD_CLOEXEC`. With it, `ninja` and `ninja libs` finish. - `guest_interfaces`, `guest_netctl_ap` and `guest_netctl_ap_dialog` pass. - `ctest -j4`: 1648 tests, 1009 passed, 24 failed, the rest skipped (no Vulkan loader in the environment). 22 of the failures were already there in my run on yesterday's base 9127ea36d with the same series, and none of them is in a test this PR touches. `guest_path_name_length` is new: since #8164 it expects a guest path of exactly 1023 bytes to be accepted, and macOS fails it with `ENAMETOOLONG`; I have not looked into it yet. `patched_libraries` timed out in the parallel run and passed when run alone. - Linux and Windows: not run. On Linux `__linux__` is defined, so the code that is built is the same as before; on Windows nothing changes. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: none; the AGC change only stops building the views case on macOS - [x] AI-assisted: yes
ycbuzi commented 2026-10-21 07:04:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ycbuzi on 2026-10-21T07:04:48Z.


Windows run of 57e3e7c645 merged onto main 7ce3b1df3e (a2d00c7db2, clean), one of the hosts the description lists as not run. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, BUILD_TESTING=ON.

Built libc, libSceAgcDriver, agc_driver_graphics_tests, guest_interface_tests and guest_netctl_ap_tests with no errors; ctest --repeat until-fail:2 on the 29 tests those executables register (guest_netctl_ap, guest_interfaces, agc_driver_graphics and the agc_* cases): all pass on both repeats. Not run: Linux.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310158947 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8279#issuecomment-6310158947). Originally posted by [ycbuzi](https://github.com/ycbuzi) on 2026-10-21T07:04:48Z. --- Windows run of 57e3e7c645 merged onto `main` 7ce3b1df3e (a2d00c7db2, clean), one of the hosts the description lists as not run. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, `BUILD_TESTING=ON`. Built `libc`, `libSceAgcDriver`, `agc_driver_graphics_tests`, `guest_interface_tests` and `guest_netctl_ap_tests` with no errors; `ctest --repeat until-fail:2` on the 29 tests those executables register (`guest_netctl_ap`, `guest_interfaces`, `agc_driver_graphics` and the `agc_*` cases): all pass on both repeats. Not run: Linux.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!8279
No description provided.