Add some missing ifndef for udns
This commit is contained in:
@@ -4,7 +4,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#ifdef UDNS_FOUND
|
||||||
# include <udns.h>
|
# include <udns.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
@@ -14,6 +16,7 @@
|
|||||||
|
|
||||||
using namespace std::string_literals;
|
using namespace std::string_literals;
|
||||||
|
|
||||||
|
#ifdef UDNS_FOUND
|
||||||
static std::map<int, std::string> dns_error_messages {
|
static std::map<int, std::string> dns_error_messages {
|
||||||
{DNS_E_TEMPFAIL, "Timeout while contacting DNS servers"},
|
{DNS_E_TEMPFAIL, "Timeout while contacting DNS servers"},
|
||||||
{DNS_E_PROTOCOL, "Misformatted DNS reply"},
|
{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_NOMEM, "Out of memory"},
|
||||||
{DNS_E_BADQUERY, "Misformatted domain name"}
|
{DNS_E_BADQUERY, "Misformatted domain name"}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
Resolver::Resolver():
|
Resolver::Resolver():
|
||||||
#ifdef UDNS_FOUND
|
#ifdef UDNS_FOUND
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
#ifdef UDNS_FOUND
|
||||||
# include <udns.h>
|
# include <udns.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
class AddrinfoDeleter
|
class AddrinfoDeleter
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user