From 4c611ea935a88a9e25aaa1936f20283a0627def7 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 19 Mar 2019 09:22:15 -0400 Subject: [PATCH] make macos happy --- libabyss/src/http.cpp | 2 +- llarp/config.cpp | 2 +- llarp/link/iwp.cpp | 8 ++++---- llarp/service/config.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libabyss/src/http.cpp b/libabyss/src/http.cpp index e01e8228a..c6f066006 100644 --- a/libabyss/src/http.cpp +++ b/libabyss/src/http.cpp @@ -28,7 +28,7 @@ namespace abyss if(ShouldProcessHeader(string_view(lowerHeader))) { val = val.substr(val.find_first_not_of(' ')); - Header.Headers.insert(std::make_pair(lowerHeader, val)); + Header.Headers.emplace(lowerHeader.c_str(), llarp::string_view_string(val)); } return true; } diff --git a/llarp/config.cpp b/llarp/config.cpp index 490ac2a38..51cc25f09 100644 --- a/llarp/config.cpp +++ b/llarp/config.cpp @@ -22,7 +22,7 @@ namespace llarp [&ret](const ConfigParser::Section_t &s) -> bool { for(const auto &item : s) { - ret.emplace_back(item.first, item.second); + ret.emplace_back(string_view_string(item.first), string_view_string(item.second)); } return true; })) diff --git a/llarp/link/iwp.cpp b/llarp/link/iwp.cpp index ac2383a80..a191f9746 100644 --- a/llarp/link/iwp.cpp +++ b/llarp/link/iwp.cpp @@ -7,10 +7,10 @@ namespace llarp namespace iwp { std::array< byte_t, 6 > OuterMessage::obtain_flow_id_magic = - std::array< byte_t, 6 >{'n', 'e', 't', 'i', 'd', '?'}; - + std::array< byte_t, 6 >{{'n', 'e', 't', 'i', 'd', '?'}}; + std::array< byte_t, 6 > OuterMessage::give_flow_id_magic = - std::array< byte_t, 6 >{'n', 'e', 't', 'i', 'd', '!'}; + std::array< byte_t, 6 >{{'n', 'e', 't', 'i', 'd', '!'}}; OuterMessage::OuterMessage() { @@ -273,7 +273,7 @@ namespace llarp LinkLayer::GenFlowIDFor(const PubKey& pk, const Addr& from, FlowID_t& flow) const { - std::array< byte_t, 128 > tmp = {0}; + std::array< byte_t, 128 > tmp = {{0}}; if(inet_ntop(AF_INET6, from.addr6(), (char*)tmp.data(), tmp.size()) == nullptr) return false; diff --git a/llarp/service/config.cpp b/llarp/service/config.cpp index 379f522e7..a6d8d1fe5 100644 --- a/llarp/service/config.cpp +++ b/llarp/service/config.cpp @@ -17,7 +17,7 @@ namespace llarp llarp::service::Config::section_t values; values.first.assign(name.begin(), name.end()); for(const auto& item : section) - values.second.emplace_back(item.first, item.second); + values.second.emplace_back(string_view_string(item.first), string_view_string(item.second)); services.emplace_back(values); }); return services.size() > 0;