diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-04 12:52:35 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-04 12:52:35 -0800 |
| commit | c1d11425846baf22e9a07b0f2bf2ad405e0b42e5 (patch) | |
| tree | d807aa5d3b5d5d5d65e41a88a5d0558ab78dfeaa /src/platform | |
| parent | 7eb7471b35dd0e5b9e2da0668376af5b218264e6 (diff) | |
| download | nng-c1d11425846baf22e9a07b0f2bf2ad405e0b42e5.tar.gz nng-c1d11425846baf22e9a07b0f2bf2ad405e0b42e5.tar.bz2 nng-c1d11425846baf22e9a07b0f2bf2ad405e0b42e5.zip | |
Compilation fixes for Linux.
Diffstat (limited to 'src/platform')
| -rw-r--r-- | src/platform/posix/posix_net.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/platform/posix/posix_net.c b/src/platform/posix/posix_net.c index c7c5ce82..d0cfb49c 100644 --- a/src/platform/posix/posix_net.c +++ b/src/platform/posix/posix_net.c @@ -86,9 +86,10 @@ nni_plat_lookup_host(const char *host, nni_sockaddr *addr, int flags) struct addrinfo *ai; memset(&hint, 0, sizeof (hint)); - hint.ai_flags = AI_DEFAULT | AI_PASSIVE; + hint.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; hint.ai_family = PF_UNSPEC; hint.ai_socktype = SOCK_STREAM; + hint.ai_protocol = IPPROTO_TCP; if (flags & NNI_FLAG_IPV4ONLY) { hint.ai_family = PF_INET; } |
