#include <search.h>
#include <assert.h>
+#ifdef HAVE_GNU_LIB_NAMES_H
+#include <gnu/lib-names.h>
+#endif
+
#include "nss_utils.h"
/*
* Defining _POSIX_PTHREAD_SEMANTICS before including pwd.h and grp.h gives us
case NWRAP_LIBNSL:
#ifdef HAVE_LIBNSL
handle = nwrap_main_global->libc->nsl_handle;
+#ifdef LIBNSL_SO
+ if (handle == NULL) {
+ handle = dlopen(LIBNSL_SO, flags);
+
+ nwrap_main_global->libc->nsl_handle = handle;
+ }
+#endif
if (handle == NULL) {
for (i = 10; i >= 0; i--) {
char soname[256] = {0};
/* FALL TROUGH */
case NWRAP_LIBC:
handle = nwrap_main_global->libc->handle;
+#ifdef LIBC_SO
+ if (handle == NULL) {
+ handle = dlopen(LIBC_SO, flags);
+
+ nwrap_main_global->libc->handle = handle;
+ }
+#endif
if (handle == NULL) {
for (i = 10; i >= 0; i--) {
char soname[256] = {0};