Fixed headers for res_query

This commit is contained in:
SChernykh
2023-05-11 08:54:45 +02:00
parent be8b38e5cf
commit bba4f8d0c5
2 changed files with 11 additions and 0 deletions

View File

@@ -34,6 +34,8 @@
#ifdef _WIN32
#include <WinDNS.h>
#elif defined(HAVE_RES_QUERY)
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
#endif
@@ -528,6 +530,9 @@ void P2PServer::load_peer_list()
const uint8_t* data = ns_rr_rdata(rr);
const int len = std::min<int>(ns_rr_rdlen(rr) - 1, *data);
if (len <= 0) {
continue;
}
++data;
if (!saved_list.empty()) {