Fix build error when disable nscd.
Checks
Context |
Check |
Description |
dj/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
dj/TryBot-32bit |
success
|
Build for i686
|
Commit Message
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(+)
Comments
* 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
@@ -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. */