1
0
Fork 0
alistair23-linux/tools
Alan Maguire a2b2ae3812 bpftool: Fix compilation failure for net.o with older glibc
commit 6f02b540d7 upstream.

For older glibc ~2.17, #include'ing both linux/if.h and net/if.h
fails due to complaints about redefinition of interface flags:

  CC       net.o
In file included from net.c:13:0:
/usr/include/linux/if.h:71:2: error: redeclaration of enumerator ‘IFF_UP’
  IFF_UP    = 1<<0,  /* sysfs */
  ^
/usr/include/net/if.h:44:5: note: previous definition of ‘IFF_UP’ was here
     IFF_UP = 0x1,  /* Interface is up.  */

The issue was fixed in kernel headers in [1], but since compilation
of net.c picks up system headers the problem can recur.

Dropping #include <linux/if.h> resolves the issue and it is
not needed for compilation anyhow.

[1] https://lore.kernel.org/netdev/1461512707-23058-1-git-send-email-mikko.rapeli__34748.27880641$1462831734$gmane$org@iki.fi/

Fixes: f6f3bac08f ("tools/bpf: bpftool: add net support")
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/1609948746-15369-1-git-send-email-alan.maguire@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-17 14:05:37 +01:00
..
accounting tools/accounting/getdelays.c: fix netlink attribute length 2020-04-13 10:48:08 +02:00
arch x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes 2020-12-11 13:23:30 +01:00
bpf bpftool: Fix compilation failure for net.o with older glibc 2021-01-17 14:05:37 +01:00
build tools build feature: Quote CC and CXX for their arguments 2020-08-21 13:05:38 +02:00
cgroup iocost_monitor: drop string wrap around numbers when outputting json 2020-06-22 09:31:01 +02:00
debugging
firewire treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
firmware Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
gpio tools: gpio-hammer: Avoid potential overflow in main 2020-10-01 13:17:47 +02:00
hv - First round of vmbus hibernation support from Dexuan Cui. 2019-09-24 12:36:31 -07:00
iio tools: iio: add .gitignore 2019-08-18 20:45:57 +01:00
include tools headers UAPI: Sync linux/const.h with the kernel headers 2021-01-06 14:48:37 +01:00
io_uring tools/io_uring: fix compile breakage 2020-10-07 08:01:27 +02:00
kvm/kvm_stat tools/kvm_stat: Fix kvm_exit filter name 2020-02-11 04:35:36 -08:00
laptop treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505 2019-06-19 17:11:22 +02:00
leds leds: core: Add support for composing LED class device names 2019-07-25 20:07:52 +02:00
lib libbpf: Remove arch-specific include path in Makefile 2020-10-07 08:01:25 +02:00
memory-model tools/memory-model: Fix data race detection for unordered store and load 2019-12-31 16:43:40 +01:00
nfsd
objtool objtool: Support Clang non-section symbols in ORC generation 2020-11-01 12:01:01 +01:00
pci tools: PCI: Fix fd leakage 2020-01-17 19:48:54 +01:00
pcmcia treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 247 2019-06-19 17:09:08 +02:00
perf perf probe: Fix memory leak when synthesizing SDT probes 2020-12-30 11:51:29 +01:00
power tools/power/x86/intel_pstate_tracer: changes for python 3 compatibility 2020-10-01 13:17:30 +02:00
scripts tools: Let O= makes handle a relative path with -C option 2020-04-01 11:02:00 +02:00
spi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 178 2019-05-30 11:29:19 -07:00
testing tools: selftests: add test for changing routes with PTMU exceptions 2021-01-17 14:05:32 +01:00
thermal/tmon treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 89 2019-05-24 17:37:52 +02:00
time treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
usb usbip: Fix unsafe unaligned pointer usage 2020-02-24 08:36:44 +01:00
virtio tools/virtio: xen stub 2019-10-13 09:38:27 -04:00
vm tools/vm: fix cross-compile build 2020-04-29 16:33:15 +02:00
wmi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile tools: Keep list of tools in alphabetical order 2019-08-14 10:59:59 -03:00