From c1d11425846baf22e9a07b0f2bf2ad405e0b42e5 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 4 Jan 2017 12:52:35 -0800 Subject: Compilation fixes for Linux. --- src/platform/posix/posix_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3-70-g09d2