From patchwork Tue Jul 13 12:50:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?556/5LuZ5re8?= X-Patchwork-Id: 44333 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 21740393C035 for ; Tue, 13 Jul 2021 12:52:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21740393C035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626180747; bh=1ZT2S1pN7EH2vfl86wBw2cNkUTqil+gPPyQcB3xvkiE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=sXXRi4Y9EHvFje2mHImI75ce18WND6LZnN/XwTUV6na6u9PPyFoMoQDo2phLWCft0 gGOqSnYztL4p6jLaITFuafKSTpC8yfLdPusE5gJwhHoawKu16+gkpWDq79mMLet8yK 5PqKMs1aeFjs/CctO9WOy9r0jBabAqkK4OWpCGtU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by sourceware.org (Postfix) with ESMTPS id CE481387741B for ; Tue, 13 Jul 2021 12:50:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CE481387741B X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R131e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=alimailimapcm10staff010182156082; MF=cooper.qu@linux.alibaba.com; NM=1; PH=DS; RN=4; SR=0; TI=SMTPD_---0UfgxRe8_1626180651; Received: from localhost(mailfrom:cooper.qu@linux.alibaba.com fp:SMTPD_---0UfgxRe8_1626180651) by smtp.aliyun-inc.com(127.0.0.1); Tue, 13 Jul 2021 20:50:51 +0800 To: libc-alpha@sourceware.org, fweimer@redhat.com Subject: [PATCH] Fix build error when disable nscd. Date: Tue, 13 Jul 2021 20:50:40 +0800 Message-Id: <20210713125040.28088-1-cooper.qu@linux.alibaba.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Spam-Status: No, score=-21.1 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Cooper Qu via Libc-alpha From: =?utf-8?b?556/5LuZ5re8?= Reply-To: Cooper Qu Cc: Cooper Qu , han_mao@linux.alibaba.com Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "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 --- 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. */