From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stanislav Fomichev Subject: [PATCH bpf-next] tools: bpftool: add missing bpf_prog_linfo forward declaration Date: Wed, 19 Dec 2018 14:51:47 -0800 Message-ID: <20181219225147.193430-1-sdf@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: davem@davemloft.net, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, jakub.kicinski@netronome.com, quentin.monnet@netronome.com, Stanislav Fomichev To: netdev@vger.kernel.org Return-path: Received: from mail-pl1-f201.google.com ([209.85.214.201]:33228 "EHLO mail-pl1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbeLSWvw (ORCPT ); Wed, 19 Dec 2018 17:51:52 -0500 Received: by mail-pl1-f201.google.com with SMTP id o23so15812290pll.0 for ; Wed, 19 Dec 2018 14:51:52 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: When building bpftool without HAVE_LIBBFD_SUPPORT I see the following warnings: main.h:164:23: warning: =E2=80=98struct bpf_prog_linfo=E2=80=99 declared in= side parameter list will not be visible outside of this definition or declaration const struct bpf_prog_linfo *prog_linfo, ^~~~~~~~~~~~~~ Move bpf_prog_linfo around so both HAVE_LIBBFD_SUPPORT and !HAVE_LIBBFD_SUPPORT see it. Fixes: b053b439b72ad152 ("bpf: libbpf: bpftool: Print bpf_line_info during prog dump") Signed-off-by: Stanislav Fomichev --- tools/bpf/bpftool/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool/main.h index d2beb88f0e2e..9487345b04a7 100644 --- a/tools/bpf/bpftool/main.h +++ b/tools/bpf/bpftool/main.h @@ -147,8 +147,8 @@ int prog_parse_fd(int *argc, char ***argv); int map_parse_fd(int *argc, char ***argv); int map_parse_fd_and_info(int *argc, char ***argv, void *info, __u32 *info= _len); =20 -#ifdef HAVE_LIBBFD_SUPPORT struct bpf_prog_linfo; +#ifdef HAVE_LIBBFD_SUPPORT void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes, const char *arch, const char *disassembler_options, const struct btf *btf, --=20 2.20.0.405.gbc1bbc6f85-goog