From patchwork Thu Jun 3 12:22:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 1487202 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FwlR24fc5z9s1l for ; Thu, 3 Jun 2021 22:22:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D4423404E3; Thu, 3 Jun 2021 12:22:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J_0NgXM91Voc; Thu, 3 Jun 2021 12:22:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 0D01040559; Thu, 3 Jun 2021 12:22:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 101821BF20F for ; Thu, 3 Jun 2021 12:22:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0AD5C83CD6 for ; Thu, 3 Jun 2021 12:22:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IYjhQA83PH1O for ; Thu, 3 Jun 2021 12:22:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7483B83D17 for ; Thu, 3 Jun 2021 12:22:41 +0000 (UTC) Received: from tarshish.tkos.co.il (unknown [10.0.8.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPS id 9530D440583; Thu, 3 Jun 2021 15:22:34 +0300 (IDT) From: Baruch Siach To: buildroot@busybox.net Date: Thu, 3 Jun 2021 15:22:33 +0300 Message-Id: <59a8a19501b670fa04f4db4a5b36c318d61c8795.1622722953.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH next] package/daemon: fix build without BR2_ENABLE_RUNTIME_DEBUG X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Since commit 5a8c50fe05afa ("core: enable 'NDEBUG' unless BR2_ENABLE_RUNTIME_DEBUG is set"), NDEBUG is defined in compile flags when BR2_ENABLE_RUNTIME_DEBUG is not enabled. Add a patch to make the daemon package build with NDEBUG as it should. Fixes: http://autobuild.buildroot.net/results/995ef1b5d9fce05881b2a41025916fa45b68a9bc/ http://autobuild.buildroot.net/results/98cd9fb348d6cfe676667205b1f79ec2cd1490de/ http://autobuild.buildroot.net/results/a7c51e6f59656d8c1e1c82a7129a670a68eb8a62/ Signed-off-by: Baruch Siach --- .../0002-Fix-build-with-NDEBUG-defined.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 package/daemon/0002-Fix-build-with-NDEBUG-defined.patch diff --git a/package/daemon/0002-Fix-build-with-NDEBUG-defined.patch b/package/daemon/0002-Fix-build-with-NDEBUG-defined.patch new file mode 100644 index 000000000000..e99e9d8ed73d --- /dev/null +++ b/package/daemon/0002-Fix-build-with-NDEBUG-defined.patch @@ -0,0 +1,46 @@ +From fc84d8d572ffcecb533fd6d6d025abea12ce027e Mon Sep 17 00:00:00 2001 +Message-Id: +From: Baruch Siach +Date: Thu, 3 Jun 2021 15:01:10 +0300 +Subject: [PATCH] Fix build with NDEBUG defined + +Build with NDEBUG fails because the debug() macro becomes empty. This +creates invalid syntax with the debug() call is the only statement in +the body of a 'for' loop. + +This fixes build failures like: + +daemon.c: In function 'show': +daemon.c:3607:2: error: expected expression before '}' token + } + ^ + +Signed-off-by: Baruch Siach +--- +Upstream status: https://github.com/raforg/daemon/pull/3 + + libslack/err.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libslack/err.h b/libslack/err.h +index 106bdb01e074..7acfbe46d60a 100644 +--- a/libslack/err.h ++++ b/libslack/err.h +@@ -40,10 +40,10 @@ + #undef check + + #ifdef NDEBUG +-#define debug(args) +-#define vdebug(args) +-#define debugsys(args) +-#define vdebugsys(args) ++#define debug(args) do {} while (0); ++#define vdebug(args) do {} while (0); ++#define debugsys(args) do {} while (0); ++#define vdebugsys(args) do {} while (0); + #define check(cond, mesg) (void_cast(0)) + #else + #define debug(args) debugf args; +-- +2.30.2 +