getaddrinfo(3) on musl & BSDs fails with servname = "" (#1396)
getaddrinfo(3) on musl & BSDs fails with servname = "" (#1396)

If one calls getaddrinfo(3) on OpenBSD like so, it returns -8
EAI_NONAME:

        struct addrinfo hints;
        struct addrinfo *results;
        int rv;

        results = NULL;

        memset(&hints, 0, sizeof(hints));
        hints.ai_flags = AI_ADDRCONFIG;
        hints.ai_flags |= AI_PASSIVE;
        hints.ai_family = AF_INET;
        hints.ai_socktype = SOCK_STREAM;

        rv = getaddrinfo("localhost", "", &hints, &results);

In the above code, that mirrors the current logic in resolv_task(), rv
will end up being -8. On non-musl, non-BSD posix systems I
tested (only amd64 Debian), it succeeds and returns 0.
nanomsg/nng,nanomsg/nng,nanomsg/nng,nanomsg/nng