From 54b2c8bd7e7796bb401a6c9f3fd0b457db201145 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 20 Nov 2015 10:02:54 -0500 Subject: [PATCH] backport fix build for clang --- Destination.cpp | 4 ++-- Log.cpp | 2 +- Log.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Destination.cpp b/Destination.cpp index 479006c8..6e2550eb 100644 --- a/Destination.cpp +++ b/Destination.cpp @@ -527,7 +527,7 @@ namespace client { if (!m_Pool || !IsReady ()) { - if (requestComplete) requestComplete (false); + if (requestComplete) requestComplete (nullptr); return false; } m_Service.post (std::bind (&ClientDestination::RequestLeaseSet, shared_from_this (), dest, requestComplete)); @@ -630,7 +630,7 @@ namespace client if (done) { - if (it->second->requestComplete) it->second->requestComplete (false); + if (it->second->requestComplete) it->second->requestComplete (nullptr); delete it->second; m_LeaseSetRequests.erase (it); } diff --git a/Log.cpp b/Log.cpp index 0a561e0c..a25b25e8 100644 --- a/Log.cpp +++ b/Log.cpp @@ -24,7 +24,7 @@ void LogMsg::Process() const std::string& Log::GetTimestamp () { -#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 6) +#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 6) && !defined(__clang__) auto ts = std::chrono::monotonic_clock::now (); #else auto ts = std::chrono::steady_clock::now (); diff --git a/Log.h b/Log.h index ea821954..8728149f 100644 --- a/Log.h +++ b/Log.h @@ -50,7 +50,7 @@ class Log: public i2p::util::MsgQueue std::ostream * m_LogStream; std::string m_Timestamp; -#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 6) // gcc 4.6 +#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 6) && !defined(__clang__) // gcc 4.6 std::chrono::monotonic_clock::time_point m_LastTimestampUpdate; #else std::chrono::steady_clock::time_point m_LastTimestampUpdate;