gcc 5 compatibility workaround

pull/1129/head
Jason Rhinelander 4 years ago
parent 3bd400f6fe
commit 04c618ddae

@ -238,7 +238,7 @@ namespace llarp
} }
else else
{ {
m_netConfig.emplace(key, val); m_netConfig.emplace(str(key), str(val)); // str()'s here for gcc 5 compat
} }
} }
@ -257,12 +257,12 @@ namespace llarp
if(key == "upstream") if(key == "upstream")
{ {
llarp::LogInfo("add upstream resolver ", val); llarp::LogInfo("add upstream resolver ", val);
netConfig.emplace("upstream-dns", val); netConfig.emplace("upstream-dns", str(val)); // str() for gcc 5 compat
} }
if(key == "bind") if(key == "bind")
{ {
llarp::LogInfo("set local dns to ", val); llarp::LogInfo("set local dns to ", val);
netConfig.emplace("local-dns", val); netConfig.emplace("local-dns", str(val)); // str() for gcc 5 compat
} }
} }
@ -314,7 +314,8 @@ namespace llarp
} }
else else
{ {
m_InboundLinks.emplace_back(key, AF_INET, proto, std::move(opts)); // str() here for gcc 5 compat
m_InboundLinks.emplace_back(str(key), AF_INET, proto, std::move(opts));
} }
} }
@ -327,7 +328,7 @@ namespace llarp
void void
ServicesConfig::fromSection(string_view key, string_view val) ServicesConfig::fromSection(string_view key, string_view val)
{ {
services.emplace_back(key, val); services.emplace_back(str(key), str(val)); // str()'s here for gcc 5 compat
} }
void void

@ -131,7 +131,7 @@ namespace llarp
} }
Section_t& sect = m_Config[str(sectName)]; Section_t& sect = m_Config[str(sectName)];
LogDebug(m_FileName, ": ", sectName, ".", k, "=", v); LogDebug(m_FileName, ": ", sectName, ".", k, "=", v);
sect.emplace(k, v); sect.emplace(str(k), str(v)); // str()'s here for gcc 5 compat
} }
else // malformed? else // malformed?
{ {

Loading…
Cancel
Save