* [PATCH] Fix build error when disable nscd.
@ 2021-07-13 12:50 Cooper Qu
2021-07-14 9:36 ` Florian Weimer
0 siblings, 1 reply; 2+ messages in thread
From: Cooper Qu @ 2021-07-13 12:50 UTC (permalink / raw)
To: libc-alpha, fweimer; +Cc: han_mao, Cooper Qu
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
---
nss/nss_module.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/nss/nss_module.c b/nss/nss_module.c
index 7b42c585a4..b42f37953c 100644
--- a/nss/nss_module.c
+++ b/nss/nss_module.c
@@ -114,6 +114,7 @@ static const function_name nss_function_name_array[] =
static bool
module_load_nss_files (struct nss_module *module)
{
+# ifdef USE_NSCD
if (is_nscd)
{
void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
@@ -122,6 +123,7 @@ module_load_nss_files (struct nss_module *module)
# endif
_nss_files_init (cb);
}
+#endif
/* Initialize the function pointers, following the double-checked
locking idiom. */
--
2.26.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix build error when disable nscd.
2021-07-13 12:50 [PATCH] Fix build error when disable nscd Cooper Qu
@ 2021-07-14 9:36 ` Florian Weimer
0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2021-07-14 9:36 UTC (permalink / raw)
To: Cooper Qu via Libc-alpha; +Cc: Cooper Qu, han_mao
* Cooper Qu via Libc-alpha:
> 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
Thanks. I've applied this for you with minimal changes.
Florian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-14 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13 12:50 [PATCH] Fix build error when disable nscd Cooper Qu
2021-07-14 9:36 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).