Skip to content

x86_64-windows-musl: getaddrinfo cannot resolve a host name (no /etc/resolv.conf on Windows) #46

Description

@speak-agent

What happens

On x86_64-windows-musl, a host name does not resolve. A connect by address works.

Measured on 2026-10-02 with tinyhttps (mcpplibs/tinyhttps#23), openkal-llvm-runtime 0.15.2 (openkal-musl 0.19.2), llvm@22.1.8 and mcpp 2026.9.30.2. The program ran under wine on an x86_64 Linux host that does have DNS:

call x86_64-windows-musl (wine) x86_64-linux-gnu / x86_64-linux-musl / aarch64-linux-musl
TCP connect to 3.234.28.4:443 ok ok
TCP connect to httpbin.org:443 (getaddrinfo) fails ok

Why, as far as I can tell

openkal has no name-resolution interface. musl's resolver reads /etc/resolv.conf, and a Windows system does not have that file. Library code also cannot fall back on a nameserver of its own, because it has no portable way to find out which nameserver the system uses.

What would help

Either a source of nameservers on Windows, such as an optional openkal interface or openkal-windows answering /etc/resolv.conf from the system's DNS configuration, or a documented statement that name resolution is unavailable on this target.

tinyhttps now documents the limitation (README, "Platforms") and its CI reports "no network" for this target rather than failing.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions