On Fri, Nov 5, 2021 at 1:40 PM Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> wrote: > > On Sat, Nov 06, 2021 at 12:40:55AM IST, Andrii Nakryiko wrote: > > 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: 18f4fccbf314 ("libbpf: Update gen_loader to emit BTF_KIND_FUNC relocations") > > Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > > Thanks for the fix, and sorry about that. > > Acked-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> > No worries, we just need to figure out which compiler flags we need to catch this. I'm surprised BCC build caught this and neither libbpf's Makefile nor selftest did. Selftests are definitely too permissive w.r.t. stuff like this. If you could take a look and see what we'll need to lock it down a bit, that would be great. I've also requested help from the original reporter of this issue (see issue on Github). > > [...] > > -- > Kartikeya