--- Makefile.linux.orig	2017-08-17 15:44:59.293424249 -0400
+++ Makefile.linux	2017-08-17 15:46:10.575386368 -0400
@@ -18,7 +18,7 @@
 else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
 	NEEDED_CXXFLAGS += -std=c++11 -D_GLIBCXX_USE_NANOSLEEP=1
 else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
-	NEEDED_CXXFLAGS += -std=c++0x
+	NEEDED_CXXFLAGS += -std=c++0x -D_GLIBCXX_USE_NANOSLEEP=1
 else ifeq ($(shell expr match ${CXXVER} "[5-9]"),1) # gcc >= 5
 	NEEDED_CXXFLAGS += -std=c++11
 	LDLIBS = -latomic
--- libi2pd/Tunnel.cpp.orig	2016-10-17 00:37:40.000000000 -0400
+++ libi2pd/Tunnel.cpp	2016-10-19 19:56:06.096526898 -0400
@@ -406,7 +406,7 @@
 	
 	void Tunnels::AddTransitTunnel (std::shared_ptr<TransitTunnel> tunnel)
 	{
-		if (m_Tunnels.emplace (tunnel->GetTunnelID (), tunnel).second)
+		if (m_Tunnels.insert (make_pair(tunnel->GetTunnelID (), tunnel)).second)
 			m_TransitTunnels.push_back (tunnel);
 		else
 			LogPrint (eLogError, "Tunnel: tunnel with id ", tunnel->GetTunnelID (), " already exists");
@@ -808,7 +808,7 @@
 
 	void Tunnels::AddInboundTunnel (std::shared_ptr<InboundTunnel> newTunnel)
 	{
-		if (m_Tunnels.emplace (newTunnel->GetTunnelID (), newTunnel).second)
+		if (m_Tunnels.insert (make_pair(newTunnel->GetTunnelID (), newTunnel)).second)
 		{
 			m_InboundTunnels.push_back (newTunnel);
 			auto pool = newTunnel->GetTunnelPool ();
--- libi2pd/TunnelPool.h.orig
+++ libi2pd/TunnelPool.h
@@ -123,8 +123,8 @@
 			std::mutex m_CustomPeerSelectorMutex;
 			ITunnelPeerSelector * m_CustomPeerSelector;
 
-		uint64_t m_MinLatency=0; // if > 0 this tunnel pool will try building tunnels with minimum latency by ms
-		uint64_t m_MaxLatency=0; // if > 0 this tunnel pool will try building tunnels with maximum latency by ms
+		uint64_t m_MinLatency; // if > 0 this tunnel pool will try building tunnels with minimum latency by ms
+		uint64_t m_MaxLatency; // if > 0 this tunnel pool will try building tunnels with maximum latency by ms
 
 		public:
 
--- libi2pd/TunnelPool.cpp.orig
+++ libi2pd/TunnelPool.cpp
@@ -14,6 +14,12 @@
 #include "Event.h"
 #endif
 
+template<typename T> struct decltype_t {
+	typedef T type;
+};
+
+#define DECLTYPE(expr) decltype_t<decltype(expr)>::type
+
 namespace i2p
 {
 namespace tunnel
@@ -22,7 +28,7 @@
 	TunnelPool::TunnelPool (int numInboundHops, int numOutboundHops, int numInboundTunnels, int numOutboundTunnels):
 		m_NumInboundHops (numInboundHops), m_NumOutboundHops (numOutboundHops),
 		m_NumInboundTunnels (numInboundTunnels), m_NumOutboundTunnels (numOutboundTunnels), m_IsActive (true),
-		m_CustomPeerSelector(nullptr)
+		m_CustomPeerSelector(nullptr), m_MinLatency(0), m_MaxLatency(0)
 	{
 	}
 
@@ -326,7 +332,7 @@
 		buf += 4;
 		uint64_t timestamp = bufbe64toh (buf);
 
-		decltype(m_Tests)::mapped_type test;
+		DECLTYPE(m_Tests)::mapped_type test;
 		bool found = false;
 		{
 			std::unique_lock<std::mutex> l(m_TestsMutex);
--- libi2pd/Event.h.orig	2017-02-16 13:28:19.692773653 -0500
+++ libi2pd/Event.h	2017-02-16 13:30:19.903805378 -0500
@@ -25,6 +25,7 @@
 		class EventCore
 		{
 		public:
+			EventCore(): m_listener(nullptr) {}
 			void QueueEvent(const EventType & ev);
       void CollectEvent(const std::string & type, const std::string & ident, uint64_t val);
 			void SetListener(EventListener * l);
@@ -39,7 +40,7 @@
         uint64_t Val;
       };
       std::map<std::string, CollectedEvent> m_collected;
-			EventListener * m_listener = nullptr;
+			EventListener * m_listener;
 		};
 #ifdef WITH_EVENTS		
 		extern EventCore core;
 		extern EventCore core;
--- libi2pd/Log.cpp.orig
+++ libi2pd/Log.cpp
@@ -31,12 +31,12 @@
 	static const char *LogMsgColors[] = { "", "", "", "", "", "" };
 #else /* UNIX */
 	static const char *LogMsgColors[] = {
-		[eLogNone]      = "\033[0m",    /* reset */
-		[eLogError]     = "\033[1;31m", /* red */
-		[eLogWarning]   = "\033[1;33m", /* yellow */
-		[eLogInfo]      = "\033[1;36m", /* cyan */
-		[eLogDebug]     = "\033[1;34m", /* blue */
-		[eNumLogLevels] = "\033[0m",    /* reset */
+		"\033[0m",    /* reset */
+		"\033[1;31m", /* red */
+		"\033[1;33m", /* yellow */
+		"\033[1;36m", /* cyan */
+		"\033[1;34m", /* blue */
+		"\033[0m",    /* reset */
 	};
 #endif
 
--- libi2pd_client/HTTPProxy.h.orig	2017-12-04 13:40:32.000000000 -0500
+++ libi2pd_client/HTTPProxy.h	2017-12-07 13:14:26.956591634 -0500
@@ -7,8 +7,6 @@
 	{
 		public:
 			HTTPProxy(const std::string& name, const std::string& address, int port, const std::string & outproxy, bool addresshelper, std::shared_ptr<i2p::client::ClientDestination> localDestination);
-			HTTPProxy(const std::string& name, const std::string& address, int port, std::shared_ptr<i2p::client::ClientDestination> localDestination = nullptr) :
-				HTTPProxy(name, address, port, "", true, localDestination) {} ;
 			~HTTPProxy() {};
 
 			std::string GetOutproxyURL() const { return m_OutproxyUrl; }
--- libi2pd/Ed25519.h.orig	2018-06-26 10:46:01.000000000 -0700
+++ libi2pd/Ed25519.h	2018-06-27 16:24:25.365149870 -0700
@@ -10,14 +10,14 @@
 {
 	struct EDDSAPoint
 	{
-		BIGNUM * x {nullptr};
-		BIGNUM * y {nullptr};
-		BIGNUM * z {nullptr};
-		BIGNUM * t {nullptr}; // projective coordinates
+		BIGNUM * x;
+		BIGNUM * y;
+		BIGNUM * z;
+		BIGNUM * t; // projective coordinates
 
-		EDDSAPoint () {}
-		EDDSAPoint (const EDDSAPoint& other)   { *this = other; }
-		EDDSAPoint (EDDSAPoint&& other)        { *this = std::move (other); }
+		EDDSAPoint (): x(nullptr), y(nullptr), z(nullptr), t(nullptr) {}
+		EDDSAPoint (const EDDSAPoint& other): x(nullptr), y(nullptr), z(nullptr), t(nullptr) { *this = other; }
+		EDDSAPoint (EDDSAPoint&& other): x(nullptr), y(nullptr), z(nullptr), t(nullptr)      { *this = std::move (other); }
 		EDDSAPoint (BIGNUM * x1, BIGNUM * y1, BIGNUM * z1 = nullptr, BIGNUM * t1 = nullptr)
 			: x(x1)
 			, y(y1)
--- libi2pd/NTCPSession.cpp.orig	2018-06-26 10:46:01.000000000 -0700
+++ libi2pd/NTCPSession.cpp	2018-07-23 21:11:18.917335635 -0700
@@ -183,7 +183,7 @@
 				}
 			}
 			// TODO: check for number of pending keys
-			auto work = new NTCPWork{shared_from_this()};
+			auto work = new NTCPWork({{shared_from_this()}});
 			m_Server.Work(work->session, [work, this]() -> std::function<void(void)> {
 					if (!work->session->m_DHKeysPair)
 						work->session->m_DHKeysPair = transports.GetNextDHKeysPair ();
@@ -249,7 +249,7 @@
 		}
 		else
 		{
-			auto work = new NTCPWork{shared_from_this()};
+			auto work = new NTCPWork({{shared_from_this()}});
 			m_Server.Work(work->session, [work, this]() -> std::function<void(void)> {
 				work->session->CreateAESKey (work->session->m_Establisher->phase2.pubKey);
 				return std::bind(&NTCPSession::HandlePhase2, work->session, work);
--- libi2pd_client/I2PService.h.orig	2018-06-26 10:46:01.000000000 -0700
+++ libi2pd_client/I2PService.h	2018-07-23 21:14:32.314300936 -0700
@@ -70,7 +70,7 @@
             bool m_ReadyTimerTriggered;
 			uint32_t m_ConnectTimeout;
 
-            const size_t NEVER_TIMES_OUT = 0;
+            const size_t NEVER_TIMES_OUT;
       
 		public:
 			bool isUpdated; // transient, used during reload only
--- libi2pd_client/I2PService.cpp.orig	2018-06-26 10:46:01.000000000 -0700
+++ libi2pd_client/I2PService.cpp	2018-07-23 21:15:59.847520946 -0700
@@ -16,7 +16,8 @@
 			m_ReadyTimer(m_LocalDestination->GetService()),
 			m_ReadyTimerTriggered(false),
 			m_ConnectTimeout(0),
-			isUpdated (true)
+			isUpdated (true),
+			NEVER_TIMES_OUT(0)
 	{
 		m_LocalDestination->Acquire ();
 	}
@@ -26,7 +26,8 @@
 		m_LocalDestination (i2p::client::context.CreateNewLocalDestination (false, kt)),
 		m_ReadyTimer(m_LocalDestination->GetService()),
 		m_ConnectTimeout(0),
-		isUpdated (true)
+		isUpdated (true),
+		NEVER_TIMES_OUT(0)
 	{
 		m_LocalDestination->Acquire ();
 	}
--- libi2pd/RouterInfo.h.orig	2018-08-23 08:10:05.000000000 -0700
+++ libi2pd/RouterInfo.h	2018-08-25 09:48:51.706887850 -0700
@@ -92,10 +92,12 @@
 
 			struct NTCP2Ext
 			{
+				NTCP2Ext(): isPublished(false), isNTCP2Only(false) {};
+
 				Tag<32> staticKey;
 				Tag<16> iv;
-				bool isPublished = false;
-				bool isNTCP2Only = false;
+				bool isPublished;
+				bool isNTCP2Only;
 			};
 
 			struct Address
--- libi2pd/Blinding.h.orig	2020-02-25 09:08:50.000000000 -0800
+++ libi2pd/Blinding.h	2020-02-26 17:03:22.152844367 -0800
@@ -39,7 +39,7 @@
 
 			std::vector<uint8_t> m_PublicKey;
 			i2p::data::SigningKeyType m_SigType, m_BlindedSigType;
-			bool m_IsClientAuth = false;
+			bool m_IsClientAuth;
 	};
 }
 }
--- libi2pd/LeaseSet.h.orig	2020-02-25 09:08:50.000000000 -0800
+++ libi2pd/LeaseSet.h	2020-02-26 17:21:50.775527499 -0800
@@ -165,8 +165,8 @@
 		private:
 
 			uint8_t m_StoreType;  
-			uint32_t m_PublishedTimestamp = 0;
-			bool m_IsPublic = true, m_IsPublishedEncrypted = false;
+			uint32_t m_PublishedTimestamp;
+			bool m_IsPublic, m_IsPublishedEncrypted;
 			std::shared_ptr<i2p::crypto::Verifier> m_TransientVerifier;
 			CryptoKeyType m_EncryptionType;
 			std::shared_ptr<i2p::crypto::CryptoKeyEncryptor> m_Encryptor; // for standardLS2
--- libi2pd/LeaseSet.cpp.orig	2020-02-25 09:08:50.000000000 -0800
+++ libi2pd/LeaseSet.cpp	2020-02-26 17:20:39.170099671 -0800
@@ -252,7 +252,7 @@
 	}
 
 	LeaseSet2::LeaseSet2 (uint8_t storeType, const uint8_t * buf, size_t len, bool storeLeases, CryptoKeyType preferredCrypto):
-		LeaseSet (storeLeases), m_StoreType (storeType), m_EncryptionType (preferredCrypto)
+		LeaseSet (storeLeases), m_StoreType (storeType), m_EncryptionType (preferredCrypto), m_PublishedTimestamp (0), m_IsPublic (true), m_IsPublishedEncrypted (false)
 	{	
 		SetBuffer (buf, len);	
 		if (storeType == NETDB_STORE_TYPE_ENCRYPTED_LEASESET2)
@@ -263,7 +263,7 @@
 
 	LeaseSet2::LeaseSet2 (const uint8_t * buf, size_t len, std::shared_ptr<const BlindedPublicKey> key, 
 		const uint8_t * secret, CryptoKeyType preferredCrypto):
-		LeaseSet (true), m_StoreType (NETDB_STORE_TYPE_ENCRYPTED_LEASESET2), m_EncryptionType (preferredCrypto)
+		LeaseSet (true), m_StoreType (NETDB_STORE_TYPE_ENCRYPTED_LEASESET2), m_EncryptionType (preferredCrypto), m_PublishedTimestamp (0), m_IsPublic (true), m_IsPublishedEncrypted (false)
 	{
 		ReadFromBufferEncrypted (buf, len, key, secret);
 	}
--- libi2pd/RouterContext.h.orig	2020-02-25 09:08:50.000000000 -0800
+++ libi2pd/RouterContext.h	2020-02-26 17:25:18.440768256 -0800
@@ -5,7 +5,7 @@
 #include <string>
 #include <memory>
 #include <mutex>
-#include <chrono>
+#include <boost/chrono.hpp>
 #include <boost/asio.hpp>
 #include "Identity.h"
 #include "RouterInfo.h"
@@ -142,7 +142,7 @@
 			std::shared_ptr<i2p::crypto::CryptoKeyDecryptor> m_Decryptor;
 			uint64_t m_LastUpdateTime; // in seconds
 			bool m_AcceptsTunnels, m_IsFloodfill;	
-			std::chrono::time_point<std::chrono::steady_clock> m_StartupTime;
+			boost::chrono::time_point<boost::chrono::steady_clock> m_StartupTime;
 			uint64_t m_BandwidthLimit; // allowed bandwidth
 			int m_ShareRatio;
 			RouterStatus m_Status;
--- libi2pd/RouterContext.cpp.orig	2020-02-25 09:08:50.000000000 -0800
+++ libi2pd/RouterContext.cpp	2020-02-26 17:26:07.070058807 -0800
@@ -27,7 +27,7 @@
 	void RouterContext::Init ()
 	{
 		srand (i2p::util::GetMillisecondsSinceEpoch () % 1000);
-		m_StartupTime = std::chrono::steady_clock::now();
+		m_StartupTime = boost::chrono::steady_clock::now();
 
 		if (!Load ())
 			CreateNewRouter ();
@@ -717,7 +717,7 @@
 
 	uint32_t RouterContext::GetUptime () const
 	{
-		return std::chrono::duration_cast<std::chrono::seconds> (std::chrono::steady_clock::now() - m_StartupTime).count ();
+		return boost::chrono::duration_cast<boost::chrono::seconds> (boost::chrono::steady_clock::now() - m_StartupTime).count ();
 	}
 
 	bool RouterContext::Decrypt (const uint8_t * encrypted, uint8_t * data, BN_CTX * ctx) const
--- libi2pd/ECIESX25519AEADRatchetSession.h.orig	2020-02-25 09:08:50.000000000 -0800
+++ libi2pd/ECIESX25519AEADRatchetSession.h	2020-02-26 18:05:27.839321012 -0800
@@ -115,10 +115,10 @@
             uint8_t m_H[32], m_CK[64] /* [chainkey, key] */, m_RemoteStaticKey[32];
 			uint8_t m_Aepk[32]; // Alice's ephemeral keys TODO: for incoming only
             i2p::crypto::X25519Keys m_EphemeralKeys;
-            SessionState m_State = eSessionStateNew;
-			uint64_t m_LastActivityTimestamp = 0; // incoming
+            SessionState m_State;
+			uint64_t m_LastActivityTimestamp; // incoming
             RatchetTagSet m_SendTagset, m_ReceiveTagset;
-			int m_NumReceiveTags = 0;
+			int m_NumReceiveTags;
 			std::unique_ptr<i2p::data::IdentHash> m_Destination;// TODO: might not need it 
     };
 }
--- libi2pd/ECIESX25519AEADRatchetSession.cpp.orig	2020-02-25 09:08:50.000000000 -0800
+++ libi2pd/ECIESX25519AEADRatchetSession.cpp	2020-02-26 18:08:10.465397719 -0800
@@ -61,7 +61,7 @@
 	}
 	
     ECIESX25519AEADRatchetSession::ECIESX25519AEADRatchetSession (GarlicDestination * owner):
-        GarlicRoutingSession (owner, true)
+        GarlicRoutingSession (owner, true), m_State(eSessionStateNew), m_LastActivityTimestamp(0), m_NumReceiveTags(0)
     {
     	ResetKeys ();
     }
--- libi2pd/Garlic.cpp.orig	2020-02-25 09:08:50.000000000 -0800
+++ libi2pd/Garlic.cpp	2020-02-26 18:22:34.385236705 -0800
@@ -959,7 +959,7 @@
 
     void GarlicDestination::AddECIESx25519SessionTag (int index, uint64_t tag, ECIESX25519AEADRatchetSessionPtr session)
     {
-        m_ECIESx25519Tags.emplace (tag, ECIESX25519AEADRatchetIndexSession{index, session, i2p::util::GetSecondsSinceEpoch ()});
+        m_ECIESx25519Tags.insert({tag, ECIESX25519AEADRatchetIndexSession{index, session, i2p::util::GetSecondsSinceEpoch ()}});
     }
 
 	void GarlicDestination::AddECIESx25519Session (const uint8_t * staticKey, ECIESX25519AEADRatchetSessionPtr session)
@@ -976,7 +976,7 @@
 				return;
 			}	
 		}
-		m_ECIESx25519Sessions.emplace (staticKeyTag, session);
+		m_ECIESx25519Sessions.insert({staticKeyTag, session});
 	}
 
 }
--- libi2pd/Timestamp.cpp.orig	2020-02-25 09:08:50.000000000 -0800
+++ libi2pd/Timestamp.cpp	2020-02-26 18:38:19.787128311 -0800
@@ -187,7 +187,7 @@
 
 	void GetDateString (uint64_t timestamp, char * date)
 	{
-		using clock = std::chrono::system_clock;
+		typedef std::chrono::system_clock clock;
 		auto t = clock::to_time_t (clock::time_point (std::chrono::seconds(timestamp)));
 		struct tm tm;
 #ifdef _WIN32
--- libi2pd/Identity.h.orig	2020-02-25 09:08:50.000000000 -0800
+++ libi2pd/Identity.h	2020-02-27 14:45:08.012926508 -0800
@@ -135,9 +135,9 @@
 	{
 		public:
 
-			PrivateKeys () = default;
-			PrivateKeys (const PrivateKeys& other) { *this = other; };
-			PrivateKeys (const Keys& keys) { *this = keys; };
+			PrivateKeys (): m_TransientSignatureLen(0), m_TransientSigningPrivateKeyLen(0) {};
+			PrivateKeys (const PrivateKeys& other): m_TransientSignatureLen(0), m_TransientSigningPrivateKeyLen(0) { *this = other; };
+			PrivateKeys (const Keys& keys): m_TransientSignatureLen(0), m_TransientSigningPrivateKeyLen(0) { *this = keys; };
 			PrivateKeys& operator=(const Keys& keys);
 			PrivateKeys& operator=(const PrivateKeys& other);
 			~PrivateKeys () = default;
@@ -182,8 +182,8 @@
 			uint8_t m_SigningPrivateKey[128]; // assume private key doesn't exceed 128 bytes
 			mutable std::unique_ptr<i2p::crypto::Signer> m_Signer;
 			std::vector<uint8_t> m_OfflineSignature; // non zero length, if applicable
-			size_t m_TransientSignatureLen = 0;
-			size_t m_TransientSigningPrivateKeyLen = 0;
+			size_t m_TransientSignatureLen;
+			size_t m_TransientSigningPrivateKeyLen;
 	};
 
 	// kademlia
