]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Fix non-C89 loop variable declaration in gen_loader.c
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 5 Nov 2021 19:10:55 +0000 (12:10 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 6 Nov 2021 23:16:52 +0000 (16:16 -0700)
commit024e5fcb0d71860ea650d07dab9782e484af2f0c
tree5e0516864195047339ee3183836dfaa4f0f2fce1
parente78ee4f9fc64ad01636926509d071a1490feef64
libbpf: Fix non-C89 loop variable declaration in gen_loader.c

Fix the `int i` declaration inside the for statement. This is non-C89
compliant. See [0] for user report breaking BCC build.

  [0] https://github.com/libbpf/libbpf/issues/403

Fixes: 9387d32b5478 ("libbpf: Update gen_loader to emit BTF_KIND_FUNC relocations")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/20211105191055.3324874-1-andrii@kernel.org
tools/lib/bpf/gen_loader.c