From: Amos Jeffries Date: Sat, 11 Aug 2012 03:21:14 +0000 (-0600) Subject: MacOS: fix AddrInfo default flags X-Git-Tag: sourceformat-review-1~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3db830d375beac634aceca2fa73b772ea5dfd39c;p=thirdparty%2Fsquid.git MacOS: fix AddrInfo default flags --- diff --git a/src/ip/Address.cc b/src/ip/Address.cc index aff975f835..dda6fa12c7 100644 --- a/src/ip/Address.cc +++ b/src/ip/Address.cc @@ -631,7 +631,12 @@ Ip::Address::GetAddrInfo(struct addrinfo *&dst, int force) const memset(dst, 0, sizeof(struct addrinfo)); // set defaults + // Mac OS X does not emit a flag indicating the output is numeric (IP address) +#if _SQUID_APPLE_ + dst->ai_flags = 0; +#else dst->ai_flags = AI_NUMERICHOST; +#endif if (dst->ai_socktype == 0) dst->ai_socktype = SOCK_STREAM;