summaryrefslogtreecommitdiff
path: root/nss/nsswitch.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-08-22 13:31:12 -0700
committerRoland McGrath <roland@hack.frob.com>2012-08-22 13:31:12 -0700
commit3cc3ef96d6c060e9d45b43f5482dc4e03945b30e (patch)
tree38fbe47c74c5109f408d107696950923d1b68ff6 /nss/nsswitch.c
parent07e515506660b1d0c1934dc0ac0e2ac5e7a4a760 (diff)
BZ#13696: Add --disable-nscd configure option.
Diffstat (limited to 'nss/nsswitch.c')
-rw-r--r--nss/nsswitch.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index a2628c747c..750cd02ab0 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -92,10 +92,12 @@ static name_database *service_table;
static name_database_entry *defconfig_entries;
+#ifdef USE_NSCD
/* Nonzero if this is the nscd process. */
static bool is_nscd;
/* The callback passed to the init functions when nscd is used. */
static void (*nscd_init_cb) (size_t, struct traced_file *);
+#endif
/* -1 == database not found
@@ -358,6 +360,7 @@ nss_load_library (service_user *ni)
ni->library->lib_handle = (void *) -1l;
__set_errno (saved_errno);
}
+# ifdef USE_NSCD
else if (is_nscd)
{
/* Call the init function when nscd is used. */
@@ -377,12 +380,13 @@ nss_load_library (service_user *ni)
if (ifct != NULL)
{
void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
-# ifdef PTR_DEMANGLE
+# ifdef PTR_DEMANGLE
PTR_DEMANGLE (cb);
-# endif
+# endif
ifct (cb);
}
}
+# endif
}
return 0;
@@ -808,7 +812,7 @@ nss_new_service (name_database *database, const char *name)
}
-#ifdef SHARED
+#if defined SHARED && defined USE_NSCD
/* Load all libraries for the service. */
static void
nss_load_all_libraries (const char *service, const char *def)