Repository navigation
feat(posix): implement gethostbyname - #1796
Conversation
27a6bbb to
44964a1
Compare
Check numeric address bytes, guest hostent fields, per-thread result lifetime, and the SDK resolver error location. The check currently fails to link because the reported export is missing.
Resolve the missing EVO-PLAYER import reported in boykopovar#1578. Convert native host entries into the guest ABI with owned per-thread storage, and use the SDK network error location for failures.
Parse legacy decimal, octal and hexadecimal forms before host lookup. Preserve FreeBSD shorthand, whitespace and 64-bit accumulation, clear the SDK resolver error on numeric success, and add regression coverage.
44964a1 to
a1e2781
Compare
|
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. I first hit this with
On MinGW, - target_link_libraries(guest_resolver_tests PRIVATE libScePosixForWebKit libSceNet)
+ target_link_libraries(guest_resolver_tests PRIVATE libScePosixForWebKit libSceNet libc)
+ configure_windows_unwind(guest_resolver_tests)With that change, 🤖 Addressed by Claude Code |
|
Fixed in c80bea9. I reproduced the reported failure on the PR head a1e2781 with a native Windows Release build: guest_resolver_tests failed to link with undefined reference to __gxx_personality_v0. The fix links the test to libc and adds configure_windows_unwind, matching guest_sce_net_tests. Tested on Windows 11 Pro (build 26300), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release:
Also tested the same patch in WSL2 Arch Linux, GCC 15.2.1, Release:
Repository conventions and whitespace checks pass. These were targeted regression tests; the full suite, console behavior and EVO-PLAYER startup were not tested in these runs. The PR testing notes have been updated. AI-assisted fix and validation. |
|
Checked on Linux (GCC, merged onto current main): |
What
Implements
gethostbynameinlibScePosixForWebKit, one of EVO-PLAYER-PS5's missing imports reported in #1578.Parses numeric IPv4 addresses with FreeBSD semantics before native hostname lookup. Supports decimal, octal and hexadecimal forms, one through four components, trailing whitespace and FreeBSD 64-bit accumulation. For example,
0x7f.1resolves to127.0.0.1. Copies the name, aliases and address list into per-thread storage with the guesthostentlayout. Linux uses reentrant lookup. Windows converts its 16-bit host fields into guest 32-bit fields. Failures updatesceNetErrnoLoc, the error location used by the public SDK's__h_errno. A successful numeric lookup clears that error.The ABI and SDK error location follow SDK v0.43 netdb.h, SDK netdb.c, and FreeBSD 11 netdb.h. Numeric parsing and success errors follow FreeBSD 11.4 inet_aton and fakeaddr. Exact PS5 semantics remain unverified and are recorded in TechnicalDebt. Windows conversion follows Microsoft HOSTENT.
Tested
undefined reference to gethostbyname_nid_postfix.guest_resolverandguest_sce_netpass. Checks cover numeric address bytes, guest field widths, names, aliases, address lists, per-thread result lifetime, and the SDK error location.5T4SHQqzoGo: numeric lookup and shared error reporting pass.0x7f.1regression check failed before the compatibility fix and passes after it. Sixteen numeric fixtures cover shorthand, octal, hexadecimal, whitespace, wrapping and component boundaries.inet_atonreference.hostentlayout, numeric lookup and error-slot checks. It uses the SDK's actual__h_errnofunction. SDK tooling remains outside the repository.Checklist
main