29e444
diff -pruN a/nscd/aicache.c b/nscd/aicache.c
29e444
--- a/nscd/aicache.c	2013-08-11 04:22:55.000000000 +0530
29e444
+++ b/nscd/aicache.c	2013-08-26 11:10:25.843470413 +0530
29e444
@@ -25,6 +25,7 @@
29e444
 #include <time.h>
29e444
 #include <unistd.h>
29e444
 #include <sys/mman.h>
29e444
+#include <resolv/res_hconf.h>
29e444
 
29e444
 #include "dbg_log.h"
29e444
 #include "nscd.h"
29e444
@@ -100,8 +101,11 @@ addhstaiX (struct database_dyn *db, int
29e444
     no_more = __nss_database_lookup ("hosts", NULL,
29e444
 				     "dns [!UNAVAIL=return] files", &nip;;
29e444
 
29e444
+  /* Initialize configurations.  */
29e444
+  if (__builtin_expect (!_res_hconf.initialized, 0))
29e444
+    _res_hconf_init ();
29e444
   if (__res_maybe_init (&_res, 0) == -1)
29e444
-	    no_more = 1;
29e444
+    no_more = 1;
29e444
 
29e444
   /* If we are looking for both IPv4 and IPv6 address we don't want
29e444
      the lookup functions to automatically promote IPv4 addresses to