From: Amos Jeffries Date: Wed, 21 Aug 2013 11:26:14 +0000 (-0600) Subject: Windows: Fix ConnOpener::sleep() collision with global macro X-Git-Tag: SQUID_3_5_0_1~662 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6c0d1ab2d27ef6cd350b3c23478f50cb85c8187;p=thirdparty%2Fsquid.git Windows: Fix ConnOpener::sleep() collision with global macro Squid compat library defines sleep() as a wrapper macro which collides with the member definition in Comm::ConnOpener. This is an iCelero project --- diff --git a/src/comm/ConnOpener.cc b/src/comm/ConnOpener.cc index 5356bd74e0..4c95f37b19 100644 --- a/src/comm/ConnOpener.cc +++ b/src/comm/ConnOpener.cc @@ -339,7 +339,7 @@ Comm::ConnOpener::connect() if (failRetries_ < Config.connect_retries) { debugs(5, 5, HERE << conn_ << ": * - try again"); - sleep(); + retrySleep(); return; } else { // send ERROR back to the upper layer. @@ -352,7 +352,7 @@ Comm::ConnOpener::connect() /// Close and wait a little before trying to open and connect again. void -Comm::ConnOpener::sleep() +Comm::ConnOpener::retrySleep() { Must(!calls_.sleep_); closeFd(); diff --git a/src/comm/ConnOpener.h b/src/comm/ConnOpener.h index 8769f615b8..f4dce459de 100644 --- a/src/comm/ConnOpener.h +++ b/src/comm/ConnOpener.h @@ -47,7 +47,7 @@ private: void connected(); void lookupLocalAddress(); - void sleep(); + void retrySleep(); void restart(); bool createFd();