From 121b16fb4bbd47ff4ce9302c40631bab858e3e71 Mon Sep 17 00:00:00 2001 From: Mouhand Kaddo <73709175+Mouhand-Kaddo@users.noreply.github.com> Date: Mon, 12 Oct 2026 01:33:53 +0400 Subject: [PATCH] fix(libkernel): guard Unix host polling in Windows select --- core/libs/prx/libkernel/Socket/src/Socket.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/libs/prx/libkernel/Socket/src/Socket.cpp b/core/libs/prx/libkernel/Socket/src/Socket.cpp index 3f71f4f1c..89c4f9c26 100644 --- a/core/libs/prx/libkernel/Socket/src/Socket.cpp +++ b/core/libs/prx/libkernel/Socket/src/Socket.cpp @@ -186,6 +186,7 @@ int APS5_VABI select_nid_postfix(int nfds, void* readfds, void* writefds, void* waitMilliseconds = static_cast(std::clamp(roundedMilliseconds, 0, 100)); } if (devicesReady) waitMilliseconds = 0; +#ifndef _WIN32 if (!hosts.empty() && !sockets.empty()) { if (poller == nullptr) UnknownDescriptor(sockets.front().descriptor, false); const auto sliceEnd = std::chrono::steady_clock::now() + std::chrono::milliseconds(waitMilliseconds); @@ -214,7 +215,9 @@ int APS5_VABI select_nid_postfix(int nfds, void* readfds, void* writefds, void* return -1; } for (std::size_t index = 0; index < hosts.size(); ++index) requested[hostSlots[index]].revents = hosts[index].revents; - } else if (!sockets.empty()) { + } else +#endif + if (!sockets.empty()) { if (poller == nullptr) UnknownDescriptor(sockets.front().descriptor, false); for (auto& socket : sockets) socket.revents = 0; const int result = poller(sockets.data(), static_cast(sockets.size()), waitMilliseconds);