From: Alexander Barton Date: Sun, 6 Nov 2011 13:13:49 +0000 (+0100) Subject: Only use AI_NUMERICHOST if it is #define'd X-Git-Tag: rel-19-rc1~122 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=commitdiff_plain;h=a7911e35afce4de5f387f9dae0f414ae35006b25;ds=sidebyside Only use AI_NUMERICHOST if it is #define'd It isn't using GNU libc 2.0.7, for example ... --- 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