fix(libScePosixForWebKit): export the host-named functions through a renamed helper

gethostbyname_r and sysinfo are names of host C library functions. Defining
them in libScePosixForWebKit made the library's own call to
::gethostbyname_r in Resolver.cpp bind to the new declaration, and the
guest_resolver test failed with "gethostbyname_r not implemented". Export
the two NIDs through a helper with the library's own prefix, the way
libSceAmpr re-exports the libc functions.
This commit is contained in:
juanpimg committed 2026-10-20 23:22:18 +02:00
1 parent 1f1add461e
commit 63af1bfcf8
2 files changed
+5 -3

No files matched your search

@@ -246,7 +246,8 @@ int APS5_VABI getenv_np() {
return 0;
}
int APS5_VABI gethostbyname_r() {
APS5_EXPORT("dt8ermYp-Wc", scePosixForWebKit_gethostbyname_r);
int APS5_VABI scePosixForWebKit_gethostbyname_r() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
@@ -271,7 +272,8 @@ int APS5_VABI setenv_np() {
return 0;
}
int APS5_VABI sysinfo() {
APS5_EXPORT("9Vqxt-qBPB4", scePosixForWebKit_sysinfo);
int APS5_VABI scePosixForWebKit_sysinfo() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
+1 -1
View File
@@ -3,7 +3,7 @@
### Unknown function info
- [gethostbyname](../../../core/libs/prx/libScePosixForWebKit/Resolver.cpp) (libScePosixForWebKit) - numeric IPv4 forms, trailing whitespace and 64-bit accumulation follow FreeBSD 11.4 [inet_aton](https://github.com/freebsd/freebsd-src/blob/releng/11.4/lib/libc/inet/inet_addr.c); clearing the resolver error on numeric success follows [fakeaddr](https://github.com/freebsd/freebsd-src/blob/releng/11.4/lib/libc/net/gethostnamadr.c). Exact PS5 behavior is unverified; hostname lookup still uses the host resolver
- [__wrap_access, __wrap_clock_gettime, __wrap_fchown, __wrap_getcwd, __wrap_getenv, __wrap_link, __wrap_lstat, __wrap_mmap, __wrap_readlink, __wrap_statvfs, __wrap_symlink, clock_gettime_np, getenv_np, gethostbyname_r, mmap_np, msetname, pthread_setschedparam_np, setenv_np, sysinfo](../../../core/libs/prx/libScePosixForWebKit/Export.cpp) (libScePosixForWebKit) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libScePosixForWebKit.c) and the [verified NID name database](https://github.com/zecoxao/sce_symbols/blob/2883963a0a514ba6e77407a08ef4730a65e88254/aerolib.csv), but no credible prototypes were found. They are declared without parameters solely to resolve known imports; this is not an ABI claim and callers must not call them until signatures are verified.
- [__wrap_access, __wrap_clock_gettime, __wrap_fchown, __wrap_getcwd, __wrap_getenv, __wrap_link, __wrap_lstat, __wrap_mmap, __wrap_readlink, __wrap_statvfs, __wrap_symlink, clock_gettime_np, getenv_np, gethostbyname_r (`scePosixForWebKit_gethostbyname_r`), mmap_np, msetname, pthread_setschedparam_np, setenv_np, sysinfo (`scePosixForWebKit_sysinfo`)](../../../core/libs/prx/libScePosixForWebKit/Export.cpp) (libScePosixForWebKit) - names/NIDs appear in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libScePosixForWebKit.c) and [verified NID name database](https://github.com/zecoxao/sce_symbols/blob/2883963a0a514ba6e77407a08ef4730a65e88254/aerolib.csv); credible prototypes are unknown. These exports use renamed helpers; defining `gethostbyname_r` would interpose on the host function this library calls itself. All are parameterless import stubs, not ABI claims; callers must not use them until signatures are verified.
### Functional