From: Amos Jeffries Date: Fri, 6 Dec 2013 12:16:22 +0000 (-0700) Subject: Portability: sleep() is sometimes a macro X-Git-Tag: SQUID_3_4_1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2677585e6c59c919501ab6a3ca14f1a95a20553;p=thirdparty%2Fsquid.git Portability: sleep() is sometimes a macro sleep() is sometimes defined as a macro. Such as in Squid compat library. Use another name for the sleep starting method in class Ipc::UdsOp This is an iCelero Project --- diff --git a/src/ipc/UdsOp.cc b/src/ipc/UdsOp.cc index 9e32255d95..ee2ef714b0 100644 --- a/src/ipc/UdsOp.cc +++ b/src/ipc/UdsOp.cc @@ -126,12 +126,12 @@ void Ipc::UdsSender::wrote(const CommIoCbParams& params) if (params.flag != COMM_OK && retries-- > 0) { // perhaps a fresh connection and more time will help? conn()->close(); - sleep(); + startSleep(); } } /// pause for a while before resending the message -void Ipc::UdsSender::sleep() +void Ipc::UdsSender::startSleep() { Must(!sleeping); sleeping = true; diff --git a/src/ipc/UdsOp.h b/src/ipc/UdsOp.h index d7e7047993..8373c2c36c 100644 --- a/src/ipc/UdsOp.h +++ b/src/ipc/UdsOp.h @@ -71,7 +71,7 @@ protected: virtual void timedout(); // UdsOp API private: - void sleep(); + void startSleep(); void cancelSleep(); static void DelayedRetry(void *data); void delayedRetry();