]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Shield netdb.h include. Not available on all platforms (Windows)
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Wed, 13 Aug 2008 03:24:57 +0000 (05:24 +0200)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Wed, 13 Aug 2008 03:24:57 +0000 (05:24 +0200)
src/client_side_request.cc
src/wccp2.cc

index a9a878eec7963ee9c804bed24fec8e752adfb274..022e40943e4439f4da8e81abcb44e63f97eb440f 100644 (file)
@@ -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);
index f64b426cfb0b54635b40be6e8e0608902f648ba2..09d5556d96452b25c0b0ee57e3fc53750aab52e8 100644 (file)
@@ -42,7 +42,9 @@
 #include "IPAddress.h"
 
 #if USE_WCCPv2
+#if HAVE_NETDB_H
 #include <netdb.h>
+#endif
 
 #define WCCP_PORT 2048
 #define WCCP_RESPONSE_SIZE 12448