From patchwork Wed Jan 25 20:54:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Neyman X-Patchwork-Id: 719867 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3v7y3y5wQvz9sCg for ; Thu, 26 Jan 2017 07:55:10 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="EjCebOCp"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=agUZS55tfrjuNx5C6n43hGvwE7JUNqR F81J4U5EgswRTim7jW3UvGc+S6Ag1tUT7C+6oG9o/e51iXz9t8/nX9cCm/vtm9XN rwTY179G9/sF2lYjGepY1Qzd3U1UtwBjTMozFKNmyR7CUQWm4Nd38Rd932gFOF+H YT5RiQEh9dRc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=+fb/IC0UVm1Og9qgYqI6hdADCCU=; b=EjCeb OCp0BvRhPlDNVivC31OqGA1JeUa+Q11hdI/wrlFjy5lc2lwR8YOSbdRcSGmqlPvT 5CvVhgslcuWjHybgJ2Tww2hRfmt1BAc/3JGd5749QvOGsQYJ6pkEFrCS++2KqASF KLw6ZixWp84YVgGz6NuPWUiq/bAYoQ0uA7D5y0= Received: (qmail 35164 invoked by alias); 25 Jan 2017 20:55:03 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 35143 invoked by uid 89); 25 Jan 2017 20:55:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= X-HELO: nm17-vm4.access.bullet.mail.bf1.yahoo.com X-Yahoo-SMTP: 0h0Q7euswBD_g.kcEqbzJWRFfrba801gq1M1 From: Alexey Neyman To: libc-alpha@sourceware.org Cc: adhemerval.zanella@linaro.org, Alexey Neyman Subject: [PATCH v3] Fix build with --enable-static-nss Date: Wed, 25 Jan 2017 12:54:57 -0800 Message-Id: <20170125205457.15003-1-stilor@att.net> In-Reply-To: <3be10403-39c2-b4f3-f482-187280726a2e@linaro.org> References: <3be10403-39c2-b4f3-f482-187280726a2e@linaro.org> [BZ #21088] * nss/nsswitch.c (nscd_init_cb, is_nscd): make the #if around definitions match those around use, to avoid "defined but not used" error. Signed-off-by: Alexey Neyman --- ChangeLog | 6 ++++++ nss/nsswitch.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ce6f057..642a228 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-01-24 Alexey Neyman + + [BZ #21088] + * nss/nsswitch.c (nscd_init_cb, is_nscd): make the #if around definitions + match those around use, to avoid "defined but not used" error. + 2017-01-25 Florian Weimer * string/Makefile (xtests): Add comment. diff --git a/nss/nsswitch.c b/nss/nsswitch.c index 0a65f6a..8f31658 100644 --- a/nss/nsswitch.c +++ b/nss/nsswitch.c @@ -94,7 +94,7 @@ static name_database *service_table; static name_database_entry *defconfig_entries; -#ifdef USE_NSCD +#if defined USE_NSCD && (!defined DO_STATIC_NSS || defined SHARED) /* Nonzero if this is the nscd process. */ static bool is_nscd; /* The callback passed to the init functions when nscd is used. */