fix(libkernel): guard host descriptor polling out of the Windows select #4115

Closed
Greenfox07 wants to merge 1 commit from upstream-pr/4115 into main
Greenfox07 commented 2026-10-11 23:34:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Greenfox07 on 2026-10-11T23:34:45Z.


Commit 3ae258380 ("select descriptors that are not sockets") made select poll host descriptors on Linux, but HostPoll, HostEventFlags and the branch bodies that call them are only declared under #ifndef _WIN32, so the Windows libkernel stopped compiling. Main's current windows build job fails in the cmake --build build step with:

Socket.cpp:194:39: error: 'HostPoll' was not declared in this scope
Socket.cpp:212:17: error: 'HostPoll' was not declared in this scope

(Visible on the current main run: the windows job fails in cmake --build build; the introducing PR had its windows check skipped, so the break was not caught there.)

On Windows hosts is always empty: it is only filled inside #ifndef _WIN32 blocks, and descriptors 0-2 are routed to devices instead. The two HostPoll calls were dead code on Windows. This guards both branch bodies with #ifndef _WIN32 so the Windows build compiles again with no behaviour change; the sockets-only and sleep branches cover every reachable Windows path.

Verification

Windows 11, WinLibs GCC 16.2.0 (posix-seh, UCRT), Ninja, Release, BUILD_TESTING=ON:

cmake --build build-mgw --target libkernel   # succeeds; libkernel.prx links
python tools/check_conventions.py --base origin/main   # passes

The Linux side is untouched (guards only compile out dead code on Windows). Not run on Linux.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4823232041 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4115). Originally posted by [Greenfox07](https://github.com/Greenfox07) on 2026-10-11T23:34:45Z. --- Commit 3ae258380 ("select descriptors that are not sockets") made select poll host descriptors on Linux, but `HostPoll`, `HostEventFlags` and the branch bodies that call them are only declared under `#ifndef _WIN32`, so the Windows libkernel stopped compiling. Main's current `windows` build job fails in the `cmake --build build` step with: ``` Socket.cpp:194:39: error: 'HostPoll' was not declared in this scope Socket.cpp:212:17: error: 'HostPoll' was not declared in this scope ``` (Visible on the current main run: the `windows` job fails in `cmake --build build`; the introducing PR had its `windows` check skipped, so the break was not caught there.) On Windows `hosts` is always empty: it is only filled inside `#ifndef _WIN32` blocks, and descriptors 0-2 are routed to `devices` instead. The two `HostPoll` calls were dead code on Windows. This guards both branch bodies with `#ifndef _WIN32` so the Windows build compiles again with no behaviour change; the sockets-only and sleep branches cover every reachable Windows path. ## Verification Windows 11, WinLibs GCC 16.2.0 (posix-seh, UCRT), Ninja, Release, `BUILD_TESTING=ON`: ``` cmake --build build-mgw --target libkernel # succeeds; libkernel.prx links python tools/check_conventions.py --base origin/main # passes ``` The Linux side is untouched (guards only compile out dead code on Windows). Not run on Linux. AI-assisted: yes (Claude Code).
MarcZX10 commented 2026-10-12 01:13:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T01:13:44Z.


The conventions check (run 38184810505) reports the required What, Tested, and Checklist template sections are missing or empty. The current body has the verification text but not those section headings; please add the required sections and move the existing summary beneath them so the conventions check can pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6116006174 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4115#issuecomment-6116006174). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-12T01:13:44Z. --- The conventions check (run 38184810505) reports the required `What`, `Tested`, and `Checklist` template sections are missing or empty. The current body has the verification text but not those section headings; please add the required sections and move the existing summary beneath them so the conventions check can pass.
oneandonlydean commented 2026-10-12 07:36:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T07:36:21Z.


Closing: #4021 already guards the host polling in the Windows select (121b16fb4b), so main builds on Windows again.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6119847649 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4115#issuecomment-6119847649). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-12T07:36:21Z. --- Closing: #4021 already guards the host polling in the Windows select (121b16fb4b), so main builds on Windows again.

Pull request closed

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!4115
No description provided.