backport fix build for clang

This commit is contained in:
orignal 2015-11-20 10:02:54 -05:00
parent d01a21a867
commit 54b2c8bd7e
3 changed files with 4 additions and 4 deletions

View file

@ -527,7 +527,7 @@ namespace client
{ {
if (!m_Pool || !IsReady ()) if (!m_Pool || !IsReady ())
{ {
if (requestComplete) requestComplete (false); if (requestComplete) requestComplete (nullptr);
return false; return false;
} }
m_Service.post (std::bind (&ClientDestination::RequestLeaseSet, shared_from_this (), dest, requestComplete)); m_Service.post (std::bind (&ClientDestination::RequestLeaseSet, shared_from_this (), dest, requestComplete));
@ -630,7 +630,7 @@ namespace client
if (done) if (done)
{ {
if (it->second->requestComplete) it->second->requestComplete (false); if (it->second->requestComplete) it->second->requestComplete (nullptr);
delete it->second; delete it->second;
m_LeaseSetRequests.erase (it); m_LeaseSetRequests.erase (it);
} }

View file

@ -24,7 +24,7 @@ void LogMsg::Process()
const std::string& Log::GetTimestamp () 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 (); auto ts = std::chrono::monotonic_clock::now ();
#else #else
auto ts = std::chrono::steady_clock::now (); auto ts = std::chrono::steady_clock::now ();

2
Log.h
View file

@ -50,7 +50,7 @@ class Log: public i2p::util::MsgQueue<LogMsg>
std::ostream * m_LogStream; std::ostream * m_LogStream;
std::string m_Timestamp; 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; std::chrono::monotonic_clock::time_point m_LastTimestampUpdate;
#else #else
std::chrono::steady_clock::time_point m_LastTimestampUpdate; std::chrono::steady_clock::time_point m_LastTimestampUpdate;