From f7baf885b87eaeebf55133460ab5da9e475f31d0 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Tue, 10 Mar 1998 18:34:51 +0000 Subject: [PATCH] Include and . git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4567 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/resolve.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/roken/resolve.c b/lib/roken/resolve.c index 3590e6700..d35beac5b 100644 --- a/lib/roken/resolve.c +++ b/lib/roken/resolve.c @@ -40,6 +40,12 @@ #include #endif #include "roken.h" +#ifdef HAVE_ARPA_NAMESER_H +#include +#endif +#ifdef HAVE_RESOLV_H +#include +#endif #include "resolve.h" RCSID("$Id$"); @@ -63,6 +69,8 @@ static struct stot{ {NULL, 0} }; +int _resolve_debug; + static int string_to_type(const char *name) { @@ -255,20 +263,16 @@ dns_lookup(const char *domain, const char *type_name) u_long old_options = 0; type = string_to_type(type_name); -#if 0 - if (krb_dns_debug) { + if (_resolve_debug) { old_options = _res.options; _res.options |= RES_DEBUG; - krb_warning("dns_lookup(%s, %s)\n", domain, type_name); + fprintf(stderr, "dns_lookup(%s, %s)\n", domain, type_name); } -#endif len = res_search(domain, C_IN, type, reply, sizeof(reply)); -#if 0 - if (krb_dns_debug) { + if (_resolve_debug) { _res.options = old_options; - krb_warning("dns_lookup(%s, %s) --> %d\n", domain, type_name, len); + fprintf(stderr, "dns_lookup(%s, %s) --> %d\n", domain, type_name, len); } -#endif if (len >= 0) r = parse_reply(reply, len); return r;