initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
From 18a9f7732944bfe45023f9dd7528295e7d43e678 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
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 <fontaine.fabrice@gmail.com>
|
||||
[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);
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 64a185ce2017e4523f4bc39a36c7aebd6d68549a Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
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 <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
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
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_IFTOP
|
||||
bool "iftop"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_PACKAGE_NCURSES
|
||||
select BR2_PACKAGE_LIBPCAP
|
||||
help
|
||||
iftop does for network usage what top(1) does for CPU usage.
|
||||
It listens to network traffic on a named interface and
|
||||
displays a table of current bandwidth usage by pairs of hosts.
|
||||
Handy for answering the question "why is our ADSL link so
|
||||
slow?".
|
||||
|
||||
http://www.ex-parrot.com/pdw/iftop/
|
||||
|
||||
comment "iftop needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97 iftop-1.0pre4.tar.gz
|
||||
sha256 c00d1408e080e7f14615c7c2e0fbd079f1b2c19e93fc6eab819bdee8d5fdfbc4 COPYING
|
||||
@@ -0,0 +1,19 @@
|
||||
################################################################################
|
||||
#
|
||||
# iftop
|
||||
#
|
||||
################################################################################
|
||||
|
||||
IFTOP_VERSION = 1.0pre4
|
||||
IFTOP_SITE = http://www.ex-parrot.com/pdw/iftop/download
|
||||
IFTOP_DEPENDENCIES = ncurses libpcap
|
||||
IFTOP_LICENSE = GPL-2.0+
|
||||
IFTOP_LICENSE_FILES = COPYING
|
||||
|
||||
IFTOP_LIBS = -lpcap
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
IFTOP_LIBS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
|
||||
endif
|
||||
IFTOP_CONF_ENV += LIBS+="$(IFTOP_LIBS)"
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user