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:
@@ -40,6 +40,12 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
#include "roken.h"
|
#include "roken.h"
|
||||||
|
#ifdef HAVE_ARPA_NAMESER_H
|
||||||
|
#include <arpa/nameser.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_RESOLV_H
|
||||||
|
#include <resolv.h>
|
||||||
|
#endif
|
||||||
#include "resolve.h"
|
#include "resolve.h"
|
||||||
|
|
||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
@@ -63,6 +69,8 @@ static struct stot{
|
|||||||
{NULL, 0}
|
{NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int _resolve_debug;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
string_to_type(const char *name)
|
string_to_type(const char *name)
|
||||||
{
|
{
|
||||||
@@ -255,20 +263,16 @@ dns_lookup(const char *domain, const char *type_name)
|
|||||||
u_long old_options = 0;
|
u_long old_options = 0;
|
||||||
|
|
||||||
type = string_to_type(type_name);
|
type = string_to_type(type_name);
|
||||||
#if 0
|
if (_resolve_debug) {
|
||||||
if (krb_dns_debug) {
|
|
||||||
old_options = _res.options;
|
old_options = _res.options;
|
||||||
_res.options |= RES_DEBUG;
|
_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));
|
len = res_search(domain, C_IN, type, reply, sizeof(reply));
|
||||||
#if 0
|
if (_resolve_debug) {
|
||||||
if (krb_dns_debug) {
|
|
||||||
_res.options = old_options;
|
_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)
|
if (len >= 0)
|
||||||
r = parse_reply(reply, len);
|
r = parse_reply(reply, len);
|
||||||
return r;
|
return r;
|
||||||
|
Reference in New Issue
Block a user