+2018-03-03 Andreas Schwab <schwab@linux-m68k.org>
+
+ [BZ #22918]
+ * nss/nsswitch.h (DEFINE_DATABASE): Don't define __nss_*_database.
+ * nss/nsswitch.c (DEFINE_DATABASE): Define __nss_*_database here.
+ * nscd/gai.c (__nss_hosts_database): Readd definition.
+ * posix/tst-rfc3484.c (__nss_hosts_database): Likewise.
+ * posix/tst-rfc3484-3.c (__nss_hosts_database): Likewise.
+ * posix/tst-rfc3484-2.c (__nss_hosts_database): Likewise.
+
2018-03-02 Joseph Myers <joseph@codesourcery.com>
* sysdeps/powerpc/ifunc-sel.h (ifunc_sel): Make always_inline.
#ifdef HAVE_LIBIDN
# include <libidn/idn-stub.c>
#endif
+
+/* Some variables normally defined in libc. */
+service_user *__nss_hosts_database attribute_hidden;
/* Declare external database variables. */
#define DEFINE_DATABASE(name) \
- extern service_user *__nss_##name##_database attribute_hidden; \
+ service_user *__nss_##name##_database attribute_hidden; \
weak_extern (__nss_##name##_database)
#include "databases.def"
#undef DEFINE_DATABASE
#define MAX_NR_ADDRS 48
/* Prototypes for __nss_*_lookup2 functions. */
-#define DEFINE_DATABASE(arg) \
- service_user *__nss_##arg##_database attribute_hidden; \
- int __nss_##arg##_lookup2 (service_user **, const char *, \
- const char *, void **); \
+#define DEFINE_DATABASE(arg) \
+ extern service_user *__nss_##arg##_database attribute_hidden; \
+ int __nss_##arg##_lookup2 (service_user **, const char *, \
+ const char *, void **); \
libc_hidden_proto (__nss_##arg##_lookup2)
#include "databases.def"
#undef DEFINE_DATABASE
#undef USE_NSCD
#include "../sysdeps/posix/getaddrinfo.c"
+service_user *__nss_hosts_database attribute_hidden;
/* This is the beginning of the real test code. The above defines
(among other things) the function rfc3484_sort. */
#undef USE_NSCD
#include "../sysdeps/posix/getaddrinfo.c"
+service_user *__nss_hosts_database attribute_hidden;
/* This is the beginning of the real test code. The above defines
(among other things) the function rfc3484_sort. */
#undef USE_NSCD
#include "../sysdeps/posix/getaddrinfo.c"
+service_user *__nss_hosts_database attribute_hidden;
/* This is the beginning of the real test code. The above defines
(among other things) the function rfc3484_sort. */