Include <arpa/nameser.h> and <resolv.h>.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4567 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1998-03-10 18:34:51 +00:00
parent 873253e222
commit f7baf885b8

View File

@@ -40,6 +40,12 @@
#include <config.h>
#endif
#include "roken.h"
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#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;