From: Martin Mares Date: Tue, 26 Aug 2008 11:54:26 +0000 (+0200) Subject: Use h_errno instead of _res.h_errno. X-Git-Tag: v3.0.1~6 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=a8926d30cf76e5f712c002b33bbaf7977061a8be;p=pciutils.git Use h_errno instead of _res.h_errno. The latter is apparently not available on BSD. Suggested by Hasso Tepper. --- diff --git a/lib/names-net.c b/lib/names-net.c index d149491..a1a6e27 100644 --- a/lib/names-net.c +++ b/lib/names-net.c @@ -17,6 +17,7 @@ #include #include #include +#include /* * 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)