You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result in step 4 is not expected, although intentional. std.net.getAddressList invokes std.net.linuxLookupName, which requires a hard-coded /etc/resolv.conf to work. Android has no /etc/resolv.conf.
The result in step 3 is not expected and seems to be a bug. std.net.getAddressList invokes std.posix.system.getaddrinfo with link_libc=true. By providing an wrapped getaddrinfo, I confirm that getaddrinfo does write a valid sockaddr on C-side, but the resulting zig-side addr is null, producing an empty address list. As a workaround, I have to wrap getaddrinfo to fill back result.addrs.
The text was updated successfully, but these errors were encountered:
Iced-Sun
added
the
bug
Observed behavior contradicts documented or intended behavior
label
Nov 20, 2024
Zig Version
0.13.0, 0.14.0-dev.2211+05a3ac43e, 0.14.0-dev.2254+73f2671c7
Steps to Reproduce and Observed Behavior
target=arm-linux-android, link_libc=true, linkage=dynamic, libc_file=android-libc.txt
, run exe on android:target=arm-linux-android
, run exe on androidqemu-arm
Expected Behavior
The result in step 5 is expected.
The result in step 4 is not expected, although intentional.
std.net.getAddressList
invokesstd.net.linuxLookupName
, which requires a hard-coded/etc/resolv.conf
to work. Android has no/etc/resolv.conf
.The result in step 3 is not expected and seems to be a bug.
std.net.getAddressList
invokesstd.posix.system.getaddrinfo
withlink_libc=true
. By providing an wrappedgetaddrinfo
, I confirm thatgetaddrinfo
does write a validsockaddr
on C-side, but the resulting zig-sideaddr
is null, producing an empty address list. As a workaround, I have to wrapgetaddrinfo
to fill backresult.addrs
.The text was updated successfully, but these errors were encountered: