From a5d35c2455d9e3e5724c9a906deb1b58e5a5f87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 31 Jan 2017 23:47:45 +0100 Subject: Add some missing ifndef for udns --- louloulibs/network/resolver.cpp | 6 +++++- louloulibs/network/resolver.hpp | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'louloulibs') diff --git a/louloulibs/network/resolver.cpp b/louloulibs/network/resolver.cpp index efb0cf0..0655b1b 100644 --- a/louloulibs/network/resolver.cpp +++ b/louloulibs/network/resolver.cpp @@ -4,7 +4,9 @@ #include #include #include -#include +#ifdef UDNS_FOUND +# include +#endif #include #include @@ -14,6 +16,7 @@ using namespace std::string_literals; +#ifdef UDNS_FOUND static std::map dns_error_messages { {DNS_E_TEMPFAIL, "Timeout while contacting DNS servers"}, {DNS_E_PROTOCOL, "Misformatted DNS reply"}, @@ -21,6 +24,7 @@ static std::map dns_error_messages { {DNS_E_NOMEM, "Out of memory"}, {DNS_E_BADQUERY, "Misformatted domain name"} }; +#endif Resolver::Resolver(): #ifdef UDNS_FOUND diff --git a/louloulibs/network/resolver.hpp b/louloulibs/network/resolver.hpp index f516da5..800c7ec 100644 --- a/louloulibs/network/resolver.hpp +++ b/louloulibs/network/resolver.hpp @@ -10,7 +10,9 @@ #include #include #include -#include +#ifdef UDNS_FOUND +# include +#endif class AddrinfoDeleter { -- cgit v1.2.3