diff -up ntp-4.2.4p4/ntpd/ntp_config.c.resinit ntp-4.2.4p4/ntpd/ntp_config.c
--- ntp-4.2.4p4/ntpd/ntp_config.c.resinit 2008-07-28 12:17:43.000000000 +0200
+++ ntp-4.2.4p4/ntpd/ntp_config.c 2008-07-28 12:18:56.000000000 +0200
@@ -18,6 +18,7 @@
#include <ntp_random.h>
#include <isc/net.h>
#include <isc/result.h>
+#include <resolv.h>
#include <stdio.h>
#include <ctype.h>
@@ -2256,6 +2257,8 @@ getnetnum(
? ", ignored"
: "");
#endif
+ if (retval == EAI_AGAIN)
+ res_init();
if (retval == 0 &&
ptr->ai_family == AF_INET6 &&
isc_net_probeipv6() != ISC_R_SUCCESS)
diff -up ntp-4.2.4p4/ntpd/ntp_intres.c.resinit ntp-4.2.4p4/ntpd/ntp_intres.c
--- ntp-4.2.4p4/ntpd/ntp_intres.c.resinit 2007-01-23 10:05:57.000000000 +0100
+++ ntp-4.2.4p4/ntpd/ntp_intres.c 2008-07-28 12:17:43.000000000 +0200
@@ -39,6 +39,7 @@
/**/
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <resolv.h>
/**/
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h> /* MAXHOSTNAMELEN (often) */
@@ -545,6 +546,7 @@ findhostaddr(
switch (error)
{
case EAI_AGAIN:
+ res_init();
return (1);
case EAI_NONAME:
#ifndef FORCE_DNSRETRY