]> git.baikalelectronics.ru Git - kernel.git/commit
tools: bpftool: fix warning on struct bpf_prog_linfo definition
authorQuentin Monnet <quentin.monnet@netronome.com>
Fri, 14 Dec 2018 13:56:00 +0000 (13:56 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Sat, 15 Dec 2018 00:31:49 +0000 (01:31 +0100)
commit8339658aa90e2bba2ca2e9f604e29c2d8b5f1d53
tree47f8f1030470acab44ae6ec844fd3b77a1147a84
parent982e8e54d986b9f12f28f496c13a81929b9fdc6c
tools: bpftool: fix warning on struct bpf_prog_linfo definition

The following warning appears when compiling bpftool without BFD
support:

main.h:198:23: warning: 'struct bpf_prog_linfo' declared inside
    parameter list will not be visible outside of this definition or
    declaration
          const struct bpf_prog_linfo *prog_linfo,

Fix it by declaring struct bpf_prog_linfo even in the case BFD is not
supported.

Fixes: c45104177310 ("bpf: libbpf: bpftool: Print bpf_line_info during prog dump")
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/main.h