diff options
Diffstat (limited to 'apt-pkg/contrib/srvrec.cc')
-rw-r--r-- | apt-pkg/contrib/srvrec.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-pkg/contrib/srvrec.cc b/apt-pkg/contrib/srvrec.cc index a97d9c615..c0fc5dd8f 100644 --- a/apt-pkg/contrib/srvrec.cc +++ b/apt-pkg/contrib/srvrec.cc @@ -13,6 +13,7 @@ #include <arpa/nameser.h> #include <arpa/inet.h> #include <netinet/in.h> +#include <apt-pkg/nameser_compat.h> #include <resolv.h> #include <time.h> @@ -58,7 +59,7 @@ bool GetSrvRecords(std::string host, int port, std::vector<SrvRec> &Result) bool GetSrvRecords(std::string name, std::vector<SrvRec> &Result) { - unsigned char answer[PACKETSZ]; + unsigned char answer[NS_PACKETSZ]; int answer_len, compressed_name_len; int answer_count; @@ -85,7 +86,7 @@ bool GetSrvRecords(std::string name, std::vector<SrvRec> &Result) return _error->Warning("dn_skipname failed %i", compressed_name_len); // pt points to the first answer record, go over all of them now - unsigned char *pt = answer+sizeof(HEADER)+compressed_name_len+QFIXEDSZ; + unsigned char *pt = answer+sizeof(HEADER)+compressed_name_len+NS_QFIXEDSZ; while ((int)Result.size() < answer_count && pt < answer+answer_len) { u_int16_t type, klass, priority, weight, port, dlen; |