diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-08-12 13:38:14 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-08-13 22:32:07 -0700 |
commit | 4515a5556e60dc66c00895ab06986adcfddbe4c5 (patch) | |
tree | 284a6291532ade8dc05ffca91cdee9912923114b /meta-networking | |
parent | a49b1ab1adf0beea04f8f509a4e63dccba0bc722 (diff) | |
download | meta-openembedded-4515a5556e60dc66c00895ab06986adcfddbe4c5.tar.gz |
iftop: Fix build with -fno-common
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-support/iftop/iftop/iftop-1.0-gcc10.patch | 68 | ||||
-rw-r--r-- | meta-networking/recipes-support/iftop/iftop_1.0pre4.bb | 4 |
2 files changed, 71 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/iftop/iftop/iftop-1.0-gcc10.patch b/meta-networking/recipes-support/iftop/iftop/iftop-1.0-gcc10.patch new file mode 100644 index 000000000..28391a57c --- /dev/null +++ b/meta-networking/recipes-support/iftop/iftop/iftop-1.0-gcc10.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | Patch by Robert Scheck <robert@fedoraproject.org> for iftop <= 1.0pre4 to avoid a | ||
2 | GCC 10 related build failure due to global variables in a header file with omitted | ||
3 | "extern" declaration, see also: https://gcc.gnu.org/gcc-10/porting_to.html | ||
4 | |||
5 | Example build failure output: | ||
6 | /usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: multiple definition of `screen_list'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: first defined here | ||
7 | /usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaktotal'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here | ||
8 | /usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peakrecv'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here | ||
9 | /usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaksent'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here | ||
10 | /usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: multiple definition of `totals'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: first defined here | ||
11 | /usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: multiple definition of `screen_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: first defined here | ||
12 | /usr/bin/ld: ui_common.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: multiple definition of `service_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: first defined here | ||
13 | /usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: multiple definition of `screen_list'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: first defined here | ||
14 | /usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaksent'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here | ||
15 | /usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peakrecv'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here | ||
16 | /usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaktotal'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here | ||
17 | /usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: multiple definition of `totals'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: first defined here | ||
18 | /usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: multiple definition of `screen_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: first defined here | ||
19 | /usr/bin/ld: ui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: multiple definition of `service_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: first defined here | ||
20 | /usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: multiple definition of `screen_list'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:36: first defined here | ||
21 | /usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: multiple definition of `totals'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:37: first defined here | ||
22 | /usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaksent'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here | ||
23 | /usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peakrecv'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here | ||
24 | /usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: multiple definition of `peaktotal'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:38: first defined here | ||
25 | /usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: multiple definition of `screen_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:40: first defined here | ||
26 | /usr/bin/ld: tui.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: multiple definition of `service_hash'; iftop.o:/builddir/build/BUILD/iftop-1.0pre4/ui_common.h:41: first defined here | ||
27 | collect2: error: ld returned 1 exit status | ||
28 | |||
29 | Patch from https://src.fedoraproject.org/rpms/iftop/raw/master/f/iftop-1.0-gcc10.patch | ||
30 | |||
31 | Upstream-Status: Pending | ||
32 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
33 | |||
34 | --- a/ui_common.h | ||
35 | +++ b/ui_common.h | ||
36 | @@ -33,12 +33,12 @@ typedef struct host_pair_line_tag { | ||
37 | |||
38 | extern options_t options; | ||
39 | |||
40 | -sorted_list_type screen_list; | ||
41 | -host_pair_line totals; | ||
42 | -int peaksent, peakrecv, peaktotal; | ||
43 | +extern sorted_list_type screen_list; | ||
44 | +extern host_pair_line totals; | ||
45 | +extern int peaksent, peakrecv, peaktotal; | ||
46 | extern history_type history_totals; | ||
47 | -hash_type* screen_hash; | ||
48 | -hash_type* service_hash; | ||
49 | +extern hash_type* screen_hash; | ||
50 | +extern hash_type* service_hash; | ||
51 | |||
52 | void analyse_data(void); | ||
53 | void screen_list_init(void); | ||
54 | --- a/ui_common.c | ||
55 | +++ b/ui_common.c | ||
56 | @@ -24,6 +24,12 @@ int history_divs[HISTORY_DIVISIONS] = {1 | ||
57 | char* unit_bits[UNIT_DIVISIONS] = { "b", "Kb", "Mb", "Gb"}; | ||
58 | char* unit_bytes[UNIT_DIVISIONS] = { "B", "KB", "MB", "GB"}; | ||
59 | |||
60 | +sorted_list_type screen_list; | ||
61 | +host_pair_line totals; | ||
62 | +int peaksent, peakrecv, peaktotal; | ||
63 | +hash_type* screen_hash; | ||
64 | +hash_type* service_hash; | ||
65 | + | ||
66 | extern hash_type* history; | ||
67 | extern int history_pos; | ||
68 | extern int history_len; | ||
diff --git a/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb b/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb index 0c8e494c1..c71ecb32e 100644 --- a/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb +++ b/meta-networking/recipes-support/iftop/iftop_1.0pre4.bb | |||
@@ -6,7 +6,9 @@ DEPENDS = "libpcap ncurses" | |||
6 | LICENSE = "GPLv2" | 6 | LICENSE = "GPLv2" |
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=76498170798db0f4f0fb685a225f702f" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=76498170798db0f4f0fb685a225f702f" |
8 | 8 | ||
9 | SRC_URI = "http://www.ex-parrot.com/pdw/iftop/download/iftop-${PV}.tar.gz" | 9 | SRC_URI = "http://www.ex-parrot.com/pdw/iftop/download/iftop-${PV}.tar.gz \ |
10 | file://iftop-1.0-gcc10.patch \ | ||
11 | " | ||
10 | SRC_URI[md5sum] = "7e6decb4958e8a4890cccac335239f24" | 12 | SRC_URI[md5sum] = "7e6decb4958e8a4890cccac335239f24" |
11 | SRC_URI[sha256sum] = "f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97" | 13 | SRC_URI[sha256sum] = "f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97" |
12 | 14 | ||