From patchwork Tue Sep 1 21:45:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 1355411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=MaNXgGmp; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=jWbe4K2Q; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4Bh10K5yM5z9sTK for ; Wed, 2 Sep 2020 07:48:17 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=hpVyIkx9C5+FKlghPO0QKFj91vEVsvRTRcKu6lLQy1w=; b=MaNXgGmpVAqKysG2nZdaHOBQi0 T9BT24T5BjH25hUug1vepwzt4mwTJ8QkhSnkdrWWWhZLRQCftKPulCxbBOdnwQQTK7Wa4wpyuyEDs Qu6YU3zQlYMZnq/6gy8jDWHetjdLyPNr4HxcdoNPLpM5t4OEsh/g+zd1vbrqDs0O63WX9yNIpNbMg pmdd2v4utfeTAIVX3xsWcB3E2RWctAjLIot574ydd2HdASuDJ9nDk82Xwr2098UUEFwGTkGMydhQm fo6fGwB1xOmetWPd8WjAVZR3IqK9BFZ8x0UDRE1OLajSaRtPxoMEB1pel1o5VItg2uZIXGml7Lqzw BDOlMLMA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDE6M-0006Tz-Vy; Tue, 01 Sep 2020 21:46:03 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDE6K-0006T4-Hu for openwrt-devel@lists.openwrt.org; Tue, 01 Sep 2020 21:46:01 +0000 Received: by mail-pf1-x441.google.com with SMTP id 17so1606144pfw.9 for ; Tue, 01 Sep 2020 14:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=JaMDO0biqUz3Rc3IPuYgMSg4OL4/L5Y3+dnQAxND6iY=; b=jWbe4K2QVw/Iw04El0u5pdT1leId/LYdOVENV5FAvxjJnuiCwWYLnjEDIQJTE5I5tI 44HgsUu/OdxNm0IKUd5Sc/Uc81p91ZGfG2FvZRbJMmydc0xuaxU1nMLISZgTwFzw8ghS AaUIMFmaayNiLb6crvLBVS0cmiG84eS5MzAYcst3fnQTHxaLDijVaMvmwZX2OMTWn6jX kkmPRjBx+2SBO4F66SowMFO/2dlml6TQ2FWu74GtN5iAWitc403DvWA/uoc2K1NI1Ia0 7QBDrsDjaHKaD6xhM3a/O94NhphvG6WadWDlNs1cfivulb/XfX512Q6C3vqF2c84F15x a8bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=JaMDO0biqUz3Rc3IPuYgMSg4OL4/L5Y3+dnQAxND6iY=; b=hkYlwM0/dsjEk532KB6q3jtl9hCtMjVXmJ7sxgn9jyoWTKq55ZrMc8F0uTwDKQn6gB Eicpe5wyqt69LsocEF0ndS3fw06kI8HZ3YcmURV4UEL1G7rdBEDfinONT+HDACafVEdF 2tHeE5wKnOz/KUMPTvDQSCMyNaDyFTAUG4iqvqE/OBI5za4xOUC882ESIFHmYx4It7Kw wphWFqEb3dw1tcw4bflnM3FGPnTAec7zWgbZMhg93ilZ0zO+15/RgC82OnwT8rJqndn8 E5dkjCFyMzU57Hay0G8aEt/nPJUDQF5rHdDIzcFoUBVIpNagfjzgPO9f2pLDrirXau1q naKw== X-Gm-Message-State: AOAM533U9tCCfMniumqEA8guqi9HCMi30HVp3/9n/SYVl+sAMhf7aOL4 d79Ro331HT3GMBvxx80cUyoM+O+a78PsDA== X-Google-Smtp-Source: ABdhPJx72mvs1yRbM7NPPRXrLvzWXIUDOed5/3Zg8DJXdHmLDfmigplonhFfry6VnWY9Uc9lpXr+tA== X-Received: by 2002:a62:e40a:: with SMTP id r10mr225213pfh.52.1598996756169; Tue, 01 Sep 2020 14:45:56 -0700 (PDT) Received: from mangix-trapnet.lan ([2001:470:1f05:79e::a89]) by smtp.gmail.com with ESMTPSA id y128sm2951210pfy.74.2020.09.01.14.45.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 14:45:55 -0700 (PDT) From: Rosen Penev To: openwrt-devel@lists.openwrt.org Subject: [PATCH] iftop: fix compilation with GCC 10 Date: Tue, 1 Sep 2020 14:45:54 -0700 Message-Id: <20200901214554.85687-1-rosenp@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200901_174600_599087_D0BE7B72 X-CRM114-Status: GOOD ( 16.13 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rosenp[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org GCC 10 defaults to fno-common, which demands unique defenitions. Patch taken from buildroot. Signed-off-by: Rosen Penev --- package/network/utils/iftop/Makefile | 2 +- .../utils/iftop/patches/010-gcc10.patch | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 package/network/utils/iftop/patches/010-gcc10.patch diff --git a/package/network/utils/iftop/Makefile b/package/network/utils/iftop/Makefile index 98fe15c8f5..aa467c2876 100644 --- a/package/network/utils/iftop/Makefile +++ b/package/network/utils/iftop/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iftop -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://code.blinkace.com/pdw/iftop.git diff --git a/package/network/utils/iftop/patches/010-gcc10.patch b/package/network/utils/iftop/patches/010-gcc10.patch new file mode 100644 index 0000000000..7c212d03a8 --- /dev/null +++ b/package/network/utils/iftop/patches/010-gcc10.patch @@ -0,0 +1,57 @@ +From 18a9f7732944bfe45023f9dd7528295e7d43e678 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 12 Aug 2020 22:31:33 +0200 +Subject: [PATCH] ui_common.h: fix build with gcc 10 + +Define global variables as extern in header to fix the build with gcc 10 +which default to -fno-common: https://gcc.gnu.org/gcc-10/porting_to.html + +Fixes: + - http://autobuild.buildroot.org/results/55a8581f11e776439782c228441ef1c8c1243386 + +Signed-off-by: Fabrice Fontaine +[Upstream status: sent to iftop-users@lists.beasts.org] +--- + ui_common.c | 6 ++++++ + ui_common.h | 10 +++++----- + 2 files changed, 11 insertions(+), 5 deletions(-) + +diff --git a/ui_common.c b/ui_common.c +index dcf6646..b1027ec 100644 +--- a/ui_common.c ++++ b/ui_common.c +@@ -17,6 +17,12 @@ + + #include "ui_common.h" + ++sorted_list_type screen_list; ++host_pair_line totals; ++int peaksent, peakrecv, peaktotal; ++hash_type* screen_hash; ++hash_type* service_hash; ++ + /* 2, 10 and 40 seconds */ + int history_divs[HISTORY_DIVISIONS] = {1, 5, 20}; + +diff --git a/ui_common.h b/ui_common.h +index 63ae5bb..add72fe 100644 +--- a/ui_common.h ++++ b/ui_common.h +@@ -33,12 +33,12 @@ typedef struct host_pair_line_tag { + + extern options_t options; + +-sorted_list_type screen_list; +-host_pair_line totals; +-int peaksent, peakrecv, peaktotal; ++extern sorted_list_type screen_list; ++extern host_pair_line totals; ++extern int peaksent, peakrecv, peaktotal; + extern history_type history_totals; +-hash_type* screen_hash; +-hash_type* service_hash; ++extern hash_type* screen_hash; ++extern hash_type* service_hash; + + void analyse_data(void); + void screen_list_init(void);