1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

nss: Fix build error with --disable-nscd

The error is as follows:
nss_module.c: In function 'module_load_nss_files':
nss_module.c:117:7: error: 'is_nscd' undeclared (first use in this function)
  117 |   if (is_nscd)
      |       ^~~~~~~
nss_module.c:117:7: note: each undeclared identifier is reported only once for each function it appears in
nss_module.c:119:51: error: 'nscd_init_cb' undeclared (first use in this function); did you mean 'nscd_init'?
  119 |       void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
      |                                                   ^~~~~~~~~~~~
      |                                                   nscd_init
This commit is contained in:
Cooper Qu
2021-07-13 20:50:40 +08:00
committed by Florian Weimer
parent d7fe71d842
commit 135425a1dd

View File

@ -114,14 +114,16 @@ static const function_name nss_function_name_array[] =
static bool static bool
module_load_nss_files (struct nss_module *module) module_load_nss_files (struct nss_module *module)
{ {
#ifdef 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;
# ifdef PTR_DEMANGLE # ifdef PTR_DEMANGLE
PTR_DEMANGLE (cb); PTR_DEMANGLE (cb);
# endif # endif
_nss_files_init (cb); _nss_files_init (cb);
} }
#endif
/* Initialize the function pointers, following the double-checked /* Initialize the function pointers, following the double-checked
locking idiom. */ locking idiom. */