Fixed build (hopefully) on arch, fixes #169

This commit is contained in:
emeric
2021-08-15 21:35:27 +02:00
parent 43158cbce2
commit 7d0dae1a0c
3 changed files with 9 additions and 1 deletions
+1
View File
@@ -24,6 +24,7 @@
#include <unistd.h> #include <unistd.h>
#include <filesystem> #include <filesystem>
#include <optional>
#include <boost/asio/io_context.hpp> #include <boost/asio/io_context.hpp>
#include <boost/asio/posix/stream_descriptor.hpp> #include <boost/asio/posix/stream_descriptor.hpp>
+4
View File
@@ -19,6 +19,8 @@
#include "utils/NetAddress.hpp" #include "utils/NetAddress.hpp"
#ifndef BOOST_ASIO_HAS_STD_HASH
namespace std namespace std
{ {
std::size_t hash<boost::asio::ip::address>::operator()(const boost::asio::ip::address& ipAddr) const std::size_t hash<boost::asio::ip::address>::operator()(const boost::asio::ip::address& ipAddr) const
@@ -40,3 +42,5 @@ namespace std
return std::hash<std::string>{}(ipAddr.to_string()); return std::hash<std::string>{}(ipAddr.to_string());
} }
} }
#endif // BOOST_ASIO_HAS_STD_HASH
+4 -1
View File
@@ -21,6 +21,9 @@
#include <boost/asio/ip/address.hpp> #include <boost/asio/ip/address.hpp>
#ifndef BOOST_ASIO_HAS_STD_HASH
#include <functional>
namespace std namespace std
{ {
template<> struct hash<boost::asio::ip::address> template<> struct hash<boost::asio::ip::address>
@@ -30,4 +33,4 @@ namespace std
} }
#endif // BOOST_ASIO_HAS_STD_HASH