summaryrefslogtreecommitdiff
path: root/louloulibs/network/resolver.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-01-31 23:47:45 +0100
committerlouiz’ <louiz@louiz.org>2017-01-31 23:47:45 +0100
commita5d35c2455d9e3e5724c9a906deb1b58e5a5f87b (patch)
tree6b4c0183bf985e761bddcbfe3739b6dfb15549d0 /louloulibs/network/resolver.cpp
parent45f7396c8d30ed37570c4ecdaa886388f9beba3e (diff)
downloadbiboumi-a5d35c2455d9e3e5724c9a906deb1b58e5a5f87b.tar.gz
biboumi-a5d35c2455d9e3e5724c9a906deb1b58e5a5f87b.tar.bz2
biboumi-a5d35c2455d9e3e5724c9a906deb1b58e5a5f87b.tar.xz
biboumi-a5d35c2455d9e3e5724c9a906deb1b58e5a5f87b.zip
Add some missing ifndef for udns
Diffstat (limited to 'louloulibs/network/resolver.cpp')
-rw-r--r--louloulibs/network/resolver.cpp6
1 files changed, 5 insertions, 1 deletions
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 <string.h>
#include <arpa/inet.h>
#include <netinet/in.h>
-#include <udns.h>
+#ifdef UDNS_FOUND
+# include <udns.h>
+#endif
#include <fstream>
#include <cstdlib>
@@ -14,6 +16,7 @@
using namespace std::string_literals;
+#ifdef UDNS_FOUND
static std::map<int, std::string> dns_error_messages {
{DNS_E_TEMPFAIL, "Timeout while contacting DNS servers"},
{DNS_E_PROTOCOL, "Misformatted DNS reply"},
@@ -21,6 +24,7 @@ static std::map<int, std::string> dns_error_messages {
{DNS_E_NOMEM, "Out of memory"},
{DNS_E_BADQUERY, "Misformatted domain name"}
};
+#endif
Resolver::Resolver():
#ifdef UDNS_FOUND