summary refs log tree commit diff
path: root/src/ipaddr
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2011-11-06 14:13:49 +0100
committerAlexander Barton <alex@barton.de>2011-11-06 14:13:49 +0100
commita7911e35afce4de5f387f9dae0f414ae35006b25 (patch)
treef55d4c28147c2dd8703198d101aa88d93d8eb84f /src/ipaddr
parent60812b6fdf8ec8b644e1209802cd001a0a032d23 (diff)
downloadngircd-a7911e35afce4de5f387f9dae0f414ae35006b25.tar.gz
ngircd-a7911e35afce4de5f387f9dae0f414ae35006b25.zip
Only use AI_NUMERICHOST if it is #define'd
It isn't using GNU libc 2.0.7, for example ...
Diffstat (limited to 'src/ipaddr')
-rw-r--r--src/ipaddr/ng_ipaddr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ipaddr/ng_ipaddr.c b/src/ipaddr/ng_ipaddr.c
index a47a40d2..05ef6ecb 100644
--- a/src/ipaddr/ng_ipaddr.c
+++ b/src/ipaddr/ng_ipaddr.c
@@ -32,7 +32,9 @@ ng_ipaddr_init(ng_ipaddr_t *addr, const char *ip_str, UINT16 port)
 	assert(ip_str);
 
 	memset(&hints, 0, sizeof(hints));
+#ifdef AI_NUMERICHOST
 	hints.ai_flags = AI_NUMERICHOST;
+#endif
 #ifndef WANT_IPV6	/* do not convert ipv6 addresses */
 	hints.ai_family = AF_INET;
 #endif