From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id 2AD50385E004 for ; Mon, 21 Mar 2022 15:08:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2AD50385E004 Received: by mail-oi1-x22d.google.com with SMTP id q129so14505983oif.4 for ; Mon, 21 Mar 2022 08:08:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6OIb8Zov1Gm7UqKBymxUdiEC8CmG2TRj2weOyPIihDk=; b=m2/2slLWqtv2bkw7933qSBPQ9qX0J8DmFKOapwH8BfNelwkDtqmoAz0sifndh2FmjK QzIknlHBGUA+JSxIqWtlKlrLo2XRK8lZxevERpTcSQq2qHG/V6BvaTV+4h/GTSW0oIIL M9TIqH+wW2FwvY+pKR0JXSM3UE3CZMosexaU21+YmNWzqBV4ast0aBkyyUwzAFkVgS9i Kt9qkGhfs7M2TZnJsPIM0mTWl5lPr2BAV9Rkru70+DEiABMRPyc7MMWQHzAsMItO9dvv qpXSNdOMD8PqbKDzGJY/cquMNUS5Sy9mOA7DR9MK/fPp3TTwnhkI+L2EqRMPx5K/dUyd MEAA== X-Gm-Message-State: AOAM533N3/efyerCB5JdSYxD6xysqL21Ypy/M39oxvTnBcjGg52ZujmK xDaR5ZljHabvnCvMtLhN8fJ0qG1pySbetw== X-Google-Smtp-Source: ABdhPJwXR9T30t+AfO+uKcjl6rtIBgdBu3isXOwOdJ/3SrpfSk+1Sdtqnxu85nRATBpiYwjrvfI15g== X-Received: by 2002:a05:6808:1508:b0:2ec:f48e:df65 with SMTP id u8-20020a056808150800b002ecf48edf65mr10228291oiw.125.1647875334087; Mon, 21 Mar 2022 08:08:54 -0700 (PDT) Received: from birita.. ([2804:431:c7ca:2d55:f04a:67c7:cbf3:571d]) by smtp.gmail.com with ESMTPSA id o64-20020acad743000000b002ef3b249b9esm3859458oig.58.2022.03.21.08.08.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 08:08:53 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Paul Eggert Subject: [PATCH v4 6/7] misc: syslog: Move SYSLOG_NAME to USE_MISC (BZ #16355) Date: Mon, 21 Mar 2022 12:08:37 -0300 Message-Id: <20220321150838.898597-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220321150838.898597-1-adhemerval.zanella@linaro.org> References: <20220321150838.898597-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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-List-Received-Date: Mon, 21 Mar 2022 15:08:56 -0000 There is no easy solution as described on first comment in bug report, and some code (like busybox) assumes facilitynames existance when SYSLOG_NAMES is defined (so we can't just remove it as suggested in comment #2). So use the easier solution and guard it with __USE_MISC. --- misc/sys/syslog.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/sys/syslog.h b/misc/sys/syslog.h index dc3b0e7ef8..d933fea104 100644 --- a/misc/sys/syslog.h +++ b/misc/sys/syslog.h @@ -62,7 +62,7 @@ #define LOG_PRI(p) ((p) & LOG_PRIMASK) #define LOG_MAKEPRI(fac, pri) ((fac) | (pri)) -#ifdef SYSLOG_NAMES +#if defined SYSLOG_NAMES && defined __USE_MISC #define INTERNAL_NOPRI 0x10 /* the "no priority" priority */ /* mark "facility" */ #define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES << 3, 0) @@ -118,7 +118,7 @@ CODE prioritynames[] = /* facility of pri */ #define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) -#ifdef SYSLOG_NAMES +#if defined SYSLOG_NAMES && defined __USE_MISC CODE facilitynames[] = { { "auth", LOG_AUTH }, -- 2.32.0