]> mj.ucw.cz Git - pciutils.git/commitdiff
Use h_errno instead of _res.h_errno.
authorMartin Mares <mj@ucw.cz>
Tue, 26 Aug 2008 11:54:26 +0000 (13:54 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 26 Aug 2008 11:54:26 +0000 (13:54 +0200)
The latter is apparently not available on BSD.

Suggested by Hasso Tepper.

lib/names-net.c

index d14949115f35c62c4c24f6c3ad0a96d066f6866d..a1a6e275dd4bcf6c2c4966b4255c6c883dd73420 100644 (file)
@@ -17,6 +17,7 @@
 #include <netinet/in.h>
 #include <arpa/nameser.h>
 #include <resolv.h>
+#include <netdb.h>
 
 /*
  * Unfortunately, there are no portable functions for DNS RR parsing,
@@ -196,7 +197,7 @@ char
   res = res_query(dnsname, ns_c_in, ns_t_txt, answer, sizeof(answer));
   if (res < 0)
     {
-      a->debug("\tfailed, h_errno=%d\n", _res.res_h_errno);
+      a->debug("\tfailed, h_errno=%d\n", h_errno);
       return NULL;
     }
   if (dns_parse_packet(&ds, answer, res) < 0)