From: Francesco Chemolli Date: Sun, 29 Jan 2012 16:38:39 +0000 (+0100) Subject: Force-solved getpagesize() misdetection issue. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10fafda254d7c07137c8a596770c138c8234d11c;p=thirdparty%2Fsquid.git Force-solved getpagesize() misdetection issue. --- diff --git a/compat/os/mswin.h b/compat/os/mswin.h index e8373f2b61..a3ff36daad 100644 --- a/compat/os/mswin.h +++ b/compat/os/mswin.h @@ -803,9 +803,14 @@ SQUIDCEXTERN struct group * getgrnam(char *unused); #define getgid(X) static_cast(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 diff --git a/src/mem.cc b/src/mem.cc index 90fc15a91a..4cdc9ddb61 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -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 */ diff --git a/src/wccp2.cc b/src/wccp2.cc index 521fee239d..2c8ad41325 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -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);