From fefb012bf871606e41ba88cbc17b66c16c15e12f Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Mon, 4 Feb 2019 16:29:09 -0800 Subject: [PATCH] fix llvm 3.8 --- llarp/dns/message.cpp | 6 +++--- llarp/dns/server.cpp | 4 ++-- llarp/service/endpoint.cpp | 15 +++++++-------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/llarp/dns/message.cpp b/llarp/dns/message.cpp index 4408eb035..08df7c180 100644 --- a/llarp/dns/message.cpp +++ b/llarp/dns/message.cpp @@ -182,7 +182,7 @@ namespace llarp rec.rr_type = question.qtype; rec.rr_class = qClassIN; rec.ttl = ttl; - std::array< byte_t, 512 > tmp = {0}; + std::array< byte_t, 512 > tmp = {{0}}; ; llarp_buffer_t buf(tmp); if(EncodeName(&buf, name)) @@ -207,7 +207,7 @@ namespace llarp rec.rr_type = qTypeCNAME; rec.rr_class = qClassIN; rec.ttl = ttl; - std::array< byte_t, 512 > tmp = {0}; + std::array< byte_t, 512 > tmp = {{0}}; llarp_buffer_t buf(tmp); if(EncodeName(&buf, name)) { @@ -231,7 +231,7 @@ namespace llarp rec.rr_type = qTypeMX; rec.rr_class = qClassIN; rec.ttl = ttl; - std::array< byte_t, 512 > tmp = {0}; + std::array< byte_t, 512 > tmp = {{0}}; llarp_buffer_t buf(tmp); llarp_buffer_put_uint16(&buf, priority); if(EncodeName(&buf, name)) diff --git a/llarp/dns/server.cpp b/llarp/dns/server.cpp index 8450eea1c..fa4be8ae4 100644 --- a/llarp/dns/server.cpp +++ b/llarp/dns/server.cpp @@ -59,7 +59,7 @@ namespace llarp { size_t sz = m_Resolvers.size(); if(sz == 0) - return llarp::Addr("1.1.1.1", 53); + return llarp::Addr("8.8.8.8", 53); if(sz == 1) return m_Resolvers[0]; auto itr = m_Resolvers.begin(); @@ -75,7 +75,7 @@ namespace llarp void Proxy::SendMessageTo(llarp::Addr to, Message msg) { - std::array< byte_t, 1500 > tmp = {0}; + std::array< byte_t, 1500 > tmp = {{0}}; llarp_buffer_t buf(tmp); if(msg.Encode(&buf)) { diff --git a/llarp/service/endpoint.cpp b/llarp/service/endpoint.cpp index 971261967..4c2d93a76 100644 --- a/llarp/service/endpoint.cpp +++ b/llarp/service/endpoint.cpp @@ -1263,13 +1263,12 @@ namespace llarp } } // no converstation - return EnsurePathToService( - remote, - [](Address, OutboundContext* c) { - if(c) - c->UpdateIntroSet(true); - }, - 5000, false); + return EnsurePathToService(remote, + [](Address, OutboundContext* c) { + if(c) + c->UpdateIntroSet(true); + }, + 5000, false); } bool @@ -1503,7 +1502,7 @@ namespace llarp { llarp::LogError("failed to derive x25519 shared key component"); } - std::array< byte_t, 64 > tmp = {0}; + std::array< byte_t, 64 > tmp = {{0}}; // K std::copy(K.begin(), K.end(), tmp.begin()); // H (K + PKE(A, B, N))