mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-10-31 09:20:21 +00:00
Fix some string_view problems
This commit is contained in:
parent
71c6aca820
commit
ac8624698d
@ -59,6 +59,7 @@ else()
|
||||
endif(MSVC_VERSION)
|
||||
|
||||
add_compile_options(/EHca /arch:AVX2)
|
||||
add_definitions(/D_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING)
|
||||
|
||||
include(cmake/solaris.cmake)
|
||||
|
||||
|
@ -114,26 +114,26 @@ namespace llarp
|
||||
|
||||
if(ret)
|
||||
{
|
||||
LogError("failed to determine address family: ", str);
|
||||
LogError("failed to determine address family: ", in);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(res->ai_family == AF_INET6)
|
||||
{
|
||||
LogError("IPv6 address not supported yet", str);
|
||||
LogError("IPv6 address not supported yet", in);
|
||||
return false;
|
||||
}
|
||||
if(res->ai_family != AF_INET)
|
||||
{
|
||||
LogError("Address family not supported yet", str);
|
||||
LogError("Address family not supported yet", in);
|
||||
return false;
|
||||
}
|
||||
|
||||
// put it in _addr4
|
||||
struct in_addr* addr = &_addr4.sin_addr;
|
||||
if(inet_aton(str, addr) == 0)
|
||||
if(inet_aton(std::string(in).c_str(), addr) == 0)
|
||||
{
|
||||
LogError("failed to parse ", str);
|
||||
LogError("failed to parse ", in);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
#ifndef LLARP_UTIL_LOGGER_INTERNAL_HPP
|
||||
#define LLARP_UTIL_LOGGER_INTERNAL_HPP
|
||||
|
||||
#include <util/time.hpp>
|
||||
|
||||
#include <absl/time/clock.h>
|
||||
#include <absl/time/time.h>
|
||||
#include <util/time.hpp>
|
||||
#include <sstream>
|
||||
#include <ctime>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
|
||||
namespace llarp
|
||||
@ -27,7 +28,7 @@ namespace llarp
|
||||
LogAppend(ss, std::forward< TArgs >(args)...);
|
||||
}
|
||||
|
||||
static inline std::string
|
||||
inline std::string
|
||||
thread_id_string()
|
||||
{
|
||||
auto tid = std::this_thread::get_id();
|
||||
|
Loading…
Reference in New Issue
Block a user