SHA256
1
0
forked from pool/glibc
glibc/glibc-nscd-hconf.diff

39 lines
1.0 KiB
Diff

See:
http://sourceware.org/bugzilla/show_bug.cgi?id=11928
Index: glibc-2.15/nscd/aicache.c
===================================================================
--- glibc-2.15.orig/nscd/aicache.c
+++ glibc-2.15/nscd/aicache.c
@@ -26,6 +26,7 @@
#include <time.h>
#include <unistd.h>
#include <sys/mman.h>
+#include <resolv/res_hconf.h>
#include "dbg_log.h"
#include "nscd.h"
@@ -103,6 +104,8 @@ addhstaiX (struct database_dyn *db, int
if (__res_maybe_init (&_res, 0) == -1)
no_more = 1;
+ if (!_res_hconf.initialized)
+ _res_hconf_init ();
/* If we are looking for both IPv4 and IPv6 address we don't want
the lookup functions to automatically promote IPv4 addresses to
Index: glibc-2.15/resolv/res_hconf.c
===================================================================
--- glibc-2.15.orig/resolv/res_hconf.c
+++ glibc-2.15/resolv/res_hconf.c
@@ -83,7 +83,9 @@ static const struct cmd
};
/* Structure containing the state. */
+#ifndef NOT_IN_libc
struct hconf _res_hconf;
+#endif
/* Skip white space. */
static const char *