mirror of https://github.com/torvalds/linux.git
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:
|
||
|---|---|---|
| .. | ||
| Documentation | ||
| bash-completion | ||
| skeleton | ||
| .gitignore | ||
| Makefile | ||
| btf.c | ||
| btf_dumper.c | ||
| cfg.c | ||
| cfg.h | ||
| cgroup.c | ||
| common.c | ||
| feature.c | ||
| gen.c | ||
| iter.c | ||
| jit_disasm.c | ||
| json_writer.c | ||
| json_writer.h | ||
| link.c | ||
| main.c | ||
| main.h | ||
| map.c | ||
| map_perf_ring.c | ||
| net.c | ||
| netlink_dumper.c | ||
| netlink_dumper.h | ||
| perf.c | ||
| pids.c | ||
| prog.c | ||
| struct_ops.c | ||
| tracelog.c | ||
| xlated_dumper.c | ||
| xlated_dumper.h | ||