From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id 933C33889C12; Wed, 14 Jul 2021 09:35:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 933C33889C12 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc] nss: Fix build error with --disable-nscd X-Act-Checkin: glibc X-Git-Author: Cooper Qu X-Git-Refname: refs/heads/master X-Git-Oldrev: d7fe71d8424e2eb6230f264d30323a696cf54114 X-Git-Newrev: 135425a1dd50cbe2b9db0628d6c2b36c7889f30b Message-Id: <20210714093551.933C33889C12@sourceware.org> Date: Wed, 14 Jul 2021 09:35:51 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2021 09:35:51 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=135425a1dd50cbe2b9db0628d6c2b36c7889f30b commit 135425a1dd50cbe2b9db0628d6c2b36c7889f30b Author: Cooper Qu Date: Tue Jul 13 20:50:40 2021 +0800 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 Diff: --- nss/nss_module.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nss/nss_module.c b/nss/nss_module.c index 7b42c585a4..7ea5ad9887 100644 --- a/nss/nss_module.c +++ b/nss/nss_module.c @@ -114,14 +114,16 @@ 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; -# ifdef PTR_DEMANGLE +# ifdef PTR_DEMANGLE PTR_DEMANGLE (cb); -# endif +# endif _nss_files_init (cb); } +#endif /* Initialize the function pointers, following the double-checked locking idiom. */