]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Forward-declare bpf_stats_type for systems with outdated UAPI headers
authorAndrii Nakryiko <andriin@fb.com>
Sun, 21 Jun 2020 03:11:59 +0000 (20:11 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 22 Jun 2020 21:23:49 +0000 (23:23 +0200)
commitae68b0c6967ae0f43216e0a83f8efbd112d97fcf
tree6073dd31bd2a931030b81880f7ddfc437e4e56b5
parentd76b73b46e1d77d6e41bd99a3f5709ac4e4d6999
libbpf: Forward-declare bpf_stats_type for systems with outdated UAPI headers

Systems that doesn't yet have the very latest linux/bpf.h header, enum
bpf_stats_type will be undefined, causing compilation warnings. Prevents this
by forward-declaring enum.

Fixes: 5470715c0f9c ("libbpf: Add support for command BPF_ENABLE_STATS")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20200621031159.2279101-1-andriin@fb.com
tools/lib/bpf/bpf.h