From patchwork Tue Oct 5 13:56:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 45893 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 A9F8B3857022 for ; Tue, 5 Oct 2021 14:01:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9F8B3857022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633442483; bh=AT9gZVlwrGz5svlISZep4OfJKFqJlSb3pAKDMb7/rGw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=us9rNBBy8L0pj5toI4kn+nzXEPD1zKpnQerYctlRQAI79b8IDPwBo3LvYiTUz2qoa 8nq+tasu8nhB/LnX75bM0+W4xh9vq8eesVR8sN/94dvl5mwntJf6sBIR9pwI87qmvg KSfCV8FSH/IRmVcz5FxieIiAJ5duijzeoN9Ay15c= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) by sourceware.org (Postfix) with ESMTPS id CE8773857022 for ; Tue, 5 Oct 2021 13:56:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CE8773857022 Received: by mail-vs1-xe29.google.com with SMTP id l19so23762353vst.7 for ; Tue, 05 Oct 2021 06:56:41 -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=AT9gZVlwrGz5svlISZep4OfJKFqJlSb3pAKDMb7/rGw=; b=zpe7A/bIE3nIhfTe8aqLHtZsHRlvEWiJ7A/lCZoE61vfPb6HF8/LFC/OS91sKq4L4U JxdaaEjBdXy77UFMxitpBvyj5yZ4LySi6RSqKY0JVUYPKayQVebCLRSzGn//6K/xlAFx 3VVABDB6aM9/SlPEZPP4MI43bl7SChkWC4J4KeZTeougpLQ2M/0QKsR87bh9s12kF+kl u3G7TVpFNRSiXiObdKrxLXpXlxrebQygHSalhJfUNm8+h/I/fjn9xwzZ3P9tyPU72BkQ fyDyjS0yzTpOWA0gjih++LDzJ0MA7nNhGgSObIVa4Ln0L07zuB9QrjVOjFh7TMgNWIwt ouwg== X-Gm-Message-State: AOAM532NRDAOKZSmjIbl35zjjIqTRHZs9W19XHlOnU5tQST3yKz04xfi rdkstKN3wtcihJ9WC68mGNK/5g5WKPxCig== X-Google-Smtp-Source: ABdhPJxauNKY9VvIOqpmr/hiVPavAFLCBO2t/RCQATIV/ys9d9TJWiNgzOKbMUaG94q3Tvxv7V1UsA== X-Received: by 2002:a67:fe46:: with SMTP id m6mr19249967vsr.22.1633442201231; Tue, 05 Oct 2021 06:56:41 -0700 (PDT) Received: from birita.. ([2804:431:c7cb:807a:9735:fcf:f170:1c20]) by smtp.gmail.com with ESMTPSA id g204sm3204902vkg.1.2021.10.05.06.56.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 06:56:41 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 6/7] misc: syslog: Move SYSLOG_NAME to USE_MISC (BZ #16355) Date: Tue, 5 Oct 2021 10:56:30 -0300 Message-Id: <20211005135631.3209020-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211005135631.3209020-1-adhemerval.zanella@linaro.org> References: <20211005135631.3209020-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 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 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: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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..bf368d1b8d 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 },