Repository navigation
fix(libSceNet): map every host socket error through the guest errno table - #8589
Merged
oneandonlydean merged 1 commit intoOct 20, 2026
Merged
Conversation
…able sceNet translated only 21 host socket errors and reported every other one as EIO. libkernel already owns the complete FreeBSD table in GuestSockets::GuestErrorFromHost, so use it for net_error. The new check makes a stream socket with the UDP protocol fail with EPROTONOSUPPORT (43) instead of EIO (5). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
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.
|
iamthehimansh
added a commit
to iamthehimansh/AnyPS5
that referenced
this pull request
Oct 20, 2026
macOS: sceNetSocket maps EPROTOTYPE from a mismatched type/protocol pair to NET_EPROTONOSUPPORT. Darwin's socket() reports EPROTOTYPE (41) for e.g. AF_INET/SOCK_STREAM/IPPROTO_UDP, while FreeBSD (the PS5) and Linux report EPROTONOSUPPORT (43); upstream boykopovar#8589's new CheckSocketHostErrors expects 43. Linux/Windows keep the upstream path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
net_errorincore/libs/prx/libSceNet/Export.cpptranslated 21 host socket errors and returned EIO (5) for every other one (both the Windows and the POSIX variant). It now returnsGuestSockets::GuestErrorFromHost(code), the complete FreeBSD errno table libkernel already uses for its own sockets (libkernel/Socket/include/SocketError.hpp). The 21 mapped errors keep their values.Why
Errors such as
WSAEPROTONOSUPPORT,WSAEPROTOTYPE,WSAEDESTADDRREQ,WSAENOPROTOOPT,WSAEFAULT,WSAENETDOWN,WSAEHOSTDOWNandWSAEMFILEreached the guest asSCE_NET_ERROR_EIO. The numbers are FreeBSD 11errno.h(43, 41, 39, 42, 14, 50, 64, 24), the same table libkernel'ssocket()path uses.Tested
Windows 10 19045, WinLibs GCC 15.2.0, Release,
BUILD_TESTING=ON:guest_sce_net:sceNetSocket(nullptr, 2, 1, 17)(stream socket, UDP protocol) must fail with errno 43. With the change: passes 3 of 3 runs. WithExport.cpprestored toupstream/main:guest_sce_netfails.^guest_(socket|sce_net|refused|datagram)(33 tests): all pass with the change (all test targets rebuilt).tools/check_conventions.py --base upstream/main: passed.pr_overlap: no open PR changesnet_error; four PRs (fix(libSceNet): stop Sackboy loading retries on peer sockets #5836, test: organize library tests and label CTest suites #6044, Macos port #7201, feat(net): parse Ethernet address strings #8204) touch the same files elsewhere and conflict with main, so they were not compared.Supersedes the approach of closed #4989; the table is reused, not copied.
Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryAI-assisted (Claude Code).
🤖 Generated with Claude Code