mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
nss: Reconcile conditional declaration and use of `is_nscd'
This change harmonizes the declaration and use of `is_nscd' and fixes a build failure with the "--enable-static-nss --enable-nscd" configuration options due to `is_nscd' being used undeclared. The purpose of `is_nscd' is to avoid (nss <-> nscd) recursion in dynamically linked libc (SHARED) that is nscd-aware (USE_NSCD), and so its declaration and use should be guarded by the definition of those macros. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
parent
eeef96f56c
commit
bea1a4a773
1 changed files with 3 additions and 3 deletions
|
@ -53,7 +53,7 @@ static struct nss_module *nss_module_list;
|
||||||
modules. */
|
modules. */
|
||||||
__libc_lock_define (static, nss_module_list_lock);
|
__libc_lock_define (static, nss_module_list_lock);
|
||||||
|
|
||||||
#if defined USE_NSCD && (!defined DO_STATIC_NSS || defined SHARED)
|
#if defined SHARED && defined USE_NSCD
|
||||||
/* Nonzero if this is the nscd process. */
|
/* Nonzero if this is the nscd process. */
|
||||||
static bool is_nscd;
|
static bool is_nscd;
|
||||||
/* The callback passed to the init functions when nscd is used. */
|
/* The callback passed to the init functions when nscd is used. */
|
||||||
|
@ -147,7 +147,7 @@ module_load_builtin (struct nss_module *module,
|
||||||
static bool
|
static bool
|
||||||
module_load_nss_files (struct nss_module *module)
|
module_load_nss_files (struct nss_module *module)
|
||||||
{
|
{
|
||||||
#ifdef USE_NSCD
|
#if defined SHARED && defined USE_NSCD
|
||||||
if (is_nscd)
|
if (is_nscd)
|
||||||
{
|
{
|
||||||
void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
|
void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
|
||||||
|
@ -238,7 +238,7 @@ module_load (struct nss_module *module)
|
||||||
PTR_MANGLE (pointers[idx]);
|
PTR_MANGLE (pointers[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef USE_NSCD
|
# if defined SHARED && defined USE_NSCD
|
||||||
if (is_nscd)
|
if (is_nscd)
|
||||||
{
|
{
|
||||||
/* Call the init function when nscd is used. */
|
/* Call the init function when nscd is used. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue