From patchwork Wed Jun 2 06:25:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1486397 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=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; 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=CAXCNBb5; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 4FvzYv5BqPz9s5R for ; Wed, 2 Jun 2021 16:26:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id F1493401FB; Wed, 2 Jun 2021 06:26:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MGzol4hxiAhr; Wed, 2 Jun 2021 06:26:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 4408240149; Wed, 2 Jun 2021 06:26:06 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 3B4171BF2C6 for ; Wed, 2 Jun 2021 06:26:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2341D402D1 for ; Wed, 2 Jun 2021 06:26:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com 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 yeTaGLkJmeQS for ; Wed, 2 Jun 2021 06:26:01 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by smtp4.osuosl.org (Postfix) with ESMTPS id DCB5C402AD for ; Wed, 2 Jun 2021 06:26:00 +0000 (UTC) Received: by mail-wr1-x429.google.com with SMTP id c5so1010422wrq.9 for ; Tue, 01 Jun 2021 23:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zo47KmbC1VLP7pTjYcT1tDP40/vpLSAsNNOvi+25VN4=; b=CAXCNBb564MCjCx8QFQLpERrb5V3geR9MZkb8Yv5fjrE/go+AdGlmbFPGbCN2VZ9oH celxaI1cTU0iNvr4o0B8VCv98hHzAwK2b0NvfiBxcXxCvvenpGhcQ3LmBVyCS30poogp m8TU40R9DmZhHQgQblDdSmV9sxL21bDs0mrJzlONpDt62n7b+DT16ZXU2Nh3tJ6DFfda Sm8Rnt7/2Q/5iZQqIhvIsB6PmegiBFx7Jo9emBRViQM/OMYDXScFCI0i2hRqeRPB0Qoc GIqyg1xdUj8tZCL3XUmiOYMGKf5kK77vuvb6t3ScP9dklLtWTQscYUclmhw7QD+PseYP EA/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zo47KmbC1VLP7pTjYcT1tDP40/vpLSAsNNOvi+25VN4=; b=W5N8zmQ/oigbyqbePrHTDsEG1qEbVWyRs3O2DTik7kDZMpQN8bTk7bs/em90jb68Gc YgWzufwVZrU22i1zwgCZzSawEHqfGEBTfuyw6PM/SahqfgYNpG4DIz7yqQNsBoDpsCdr WeSVlh1YxOmXV34slOBF9JA1CsiME/Z/AxwN73U38CVTUoAI73rIczUmdFVIIGVAmKEl LV/7sl4Vg3LvH2+Za8CsQqleAvERAHdeeMfW5ecFzzWt97lSJJx218zHZsC53FhN1s4g WRQE5o9bI77VOfe3gEMWq3wFBBKwXa8P0DbNO5aiAFaOisefXnWkl8TUlt82s4A4bwnR vC1g== X-Gm-Message-State: AOAM530htFVN718DdlQDViD+ZB4ydirpe28TihiizwTfOi4+fBH++cZd NVKyKvnQgiRfmSMeAlyYIw+lLR4WGr4cVA== X-Google-Smtp-Source: ABdhPJyZ+p81f4A3Qc8i+X8eXdoU70WXXike8Oi5DgVg8srxeoYYwCH5RSwmphAy22tOcCboPlfvlA== X-Received: by 2002:a05:6000:1c1:: with SMTP id t1mr16252531wrx.282.1622615158825; Tue, 01 Jun 2021 23:25:58 -0700 (PDT) Received: from kali.home (lfbn-ren-1-1383-171.w86-229.abo.wanadoo.fr. [86.229.230.171]) by smtp.gmail.com with ESMTPSA id v132sm1588151wmb.14.2021.06.01.23.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 23:25:58 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Wed, 2 Jun 2021 08:25:50 +0200 Message-Id: <20210602062550.818231-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/iftop: fix static build 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: , Cc: Bogdan Radulescu , Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes: - http://autobuild.buildroot.org/results/eb53ff6b031c654daec57050dec376b5c9134a81 Signed-off-by: Fabrice Fontaine --- ...ame-pcap_filter-to-iftop_pcap_filter.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 package/iftop/0002-Rename-pcap_filter-to-iftop_pcap_filter.patch diff --git a/package/iftop/0002-Rename-pcap_filter-to-iftop_pcap_filter.patch b/package/iftop/0002-Rename-pcap_filter-to-iftop_pcap_filter.patch new file mode 100644 index 0000000000..92eedccab7 --- /dev/null +++ b/package/iftop/0002-Rename-pcap_filter-to-iftop_pcap_filter.patch @@ -0,0 +1,51 @@ +From 64a185ce2017e4523f4bc39a36c7aebd6d68549a Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 2 Jun 2021 08:21:04 +0200 +Subject: [PATCH] Rename pcap_filter to iftop_pcap_filter + +Rename pcap_filter to iftop_pcap_filter to fix the following static +build failure: + +/home/buildroot/autobuild/run/instance-3/output-1/host/bin/riscv64-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -static -o iftop addr_hash.o edline.o hash.o iftop.o ns_hash.o options.o resolver.o screenfilter.o serv_hash.o sorted_list.o threadprof.o ui_common.o ui.o tui.o util.o addrs_ioctl.o addrs_dlpi.o dlcommon.o stringmap.o cfgfile.o vector.o -lpcap -lpcap -L/home/buildroot/autobuild/run/instance-3/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/bin/../../../../bin/../riscv64-buildroot-linux-musl/sysroot/usr/lib -lnl-genl-3 -lnl-3 -lpthread -lcurses +/home/buildroot/autobuild/run/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-buildroot-linux-musl/10.2.0/../../../../riscv64-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/run/instance-3/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/bin/../../../../bin/../riscv64-buildroot-linux-musl/sysroot/usr/lib/libpcap.a(bpf_filter.o): in function `pcap_filter': +bpf_filter.c:(.text+0x4a8): multiple definition of `pcap_filter'; iftop.o:iftop.c:(.bss+0x1a8): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/eb53ff6b031c654daec57050dec376b5c9134a81 + +Signed-off-by: Fabrice Fontaine +--- + iftop.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/iftop.c b/iftop.c +index aaec6aa..f89eee3 100644 +--- a/iftop.c ++++ b/iftop.c +@@ -74,7 +74,7 @@ int history_len = 1; + pthread_mutex_t tick_mutex; + + pcap_t* pd; /* pcap descriptor */ +-struct bpf_program pcap_filter; ++struct bpf_program iftop_pcap_filter; + pcap_handler packet_handler; + + sig_atomic_t foad; +@@ -679,12 +679,12 @@ char *set_filter_code(const char *filter) { + sprintf(x, "(%s) and (ip or ip6)", filter); + } else + x = xstrdup("ip or ip6"); +- if (pcap_compile(pd, &pcap_filter, x, 1, 0) == -1) { ++ if (pcap_compile(pd, &iftop_pcap_filter, x, 1, 0) == -1) { + xfree(x); + return pcap_geterr(pd); + } + xfree(x); +- if (pcap_setfilter(pd, &pcap_filter) == -1) ++ if (pcap_setfilter(pd, &iftop_pcap_filter) == -1) + return pcap_geterr(pd); + else + return NULL; +-- +2.30.2 +