From: Henrik Nordstrom Date: Wed, 13 Aug 2008 03:24:57 +0000 (+0200) Subject: Shield netdb.h include. Not available on all platforms (Windows) X-Git-Tag: SQUID_3_1_0_1~49^2~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fefeec116b98af988f0e176ecd4a32a0c4b5db0;p=thirdparty%2Fsquid.git Shield netdb.h include. Not available on all platforms (Windows) --- diff --git a/src/client_side_request.cc b/src/client_side_request.cc index a9a878eec7..022e40943e 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -58,6 +58,7 @@ #include "ClientRequestContext.h" #include "SquidTime.h" #include "wordlist.h" +#include "inet_pton.h" #if USE_ADAPTATION #include "adaptation/AccessCheck.h" @@ -447,7 +448,7 @@ clientFollowXForwardedForCheck(int answer, void *data) while (l > 0 && ! (p[l-1] == ',' || xisspace(p[l-1]))) l--; asciiaddr = p+l; - if (inet_aton(asciiaddr, &addr) != 0) + if (xinet_pton(AF_INET, asciiaddr, &addr) != 0) { request->indirect_client_addr = addr; request->x_forwarded_for_iterator.cut(l); diff --git a/src/wccp2.cc b/src/wccp2.cc index f64b426cfb..09d5556d96 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -42,7 +42,9 @@ #include "IPAddress.h" #if USE_WCCPv2 +#if HAVE_NETDB_H #include +#endif #define WCCP_PORT 2048 #define WCCP_RESPONSE_SIZE 12448