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