]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Force-solved getpagesize() misdetection issue.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 29 Jan 2012 16:38:39 +0000 (17:38 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 29 Jan 2012 16:38:39 +0000 (17:38 +0100)
compat/os/mswin.h
src/mem.cc
src/wccp2.cc

index e8373f2b61031e50bc111144df2a556f691ecd09..a3ff36daadff83bf664cfbf9853ee8905a51766c 100644 (file)
@@ -803,9 +803,14 @@ SQUIDCEXTERN struct group * getgrnam(char *unused);
 #define getgid(X)   static_cast<gid_t>(100)
 #define setgid(X)   (void)0
 
+/* for some reason autoconf misdetects getpagesize.. */
+#if HAVE_GETPAGESIZE
+#undef HAVE_GETPAGESIZE
+#endif
+
 #if !HAVE_GETPAGESIZE
-/* Windows may lack getpagesize() prototype */
-SQUIDCEXTERN size_t getpagesize();
+/* And now we define a compatibility layer */
+size_t getpagesize();
 #define HAVE_GETPAGESIZE 2
 #endif
 
index 90fc15a91a5899d60552b6215350e95f40d6d575..4cdc9ddb61239f29432a07b6610576dfd20e81e2 100644 (file)
@@ -51,9 +51,6 @@
 #endif
 
 /* module globals */
-#if 1 || !HAVE_GETPAGESIZE
-static size_t getpagesize() { return 4096; }
-#endif
 const size_t squidSystemPageSize=getpagesize();
 
 /* local prototypes */
index 521fee239de0b3c67933aee4e5d25fe37105c31f..2c8ad41325e2bd84cf2e290ce7a80e236553ccb5 100644 (file)
@@ -1601,7 +1601,7 @@ wccp2HereIam(void *voidnotused)
                                 &service_list_ptr->wccp_packet,
                                 service_list_ptr->wccp_packet_size);
             } else {
-                send(theWccp2Connection,
+                Squid::send(theWccp2Connection,
                      &service_list_ptr->wccp_packet,
                      service_list_ptr->wccp_packet_size,
                      0);