From 844b2be7ed10e1d2208da731dbffa15848963162 Mon Sep 17 00:00:00 2001 From: octo Date: Thu, 2 Feb 2006 07:17:32 +0000 Subject: [PATCH] Make `AI_ADDRCONFIG' and `AI_PASSIVE' conditional (use them only if they exist..) --- src/network.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/network.c b/src/network.c index 5f9aa741..cf0a0a38 100644 --- a/src/network.c +++ b/src/network.c @@ -218,7 +218,13 @@ int network_create_socket (const char *node, const char *service) socklist_tail = socklist_tail->next; memset (&ai_hints, '\0', sizeof (ai_hints)); - ai_hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; + ai_hints.ai_flags = 0; +#ifdef AI_PASSIVE + ai_hints.ai_flags |= AI_PASSIVE; +#endif +#ifdef AI_ADDRCONFIG + ai_hints.ai_flags |= AI_ADDRCONFIG; +#endif ai_hints.ai_family = PF_UNSPEC; ai_hints.ai_socktype = SOCK_DGRAM; ai_hints.ai_protocol = IPPROTO_UDP; -- 2.30.2