On Mon, Jun 10, 2019 at 9:57 AM Hechao Li <hechaol@xxxxxx> wrote: > > I got an error when compiling selftests/bpf: > > libbpf.c:411:10: error: implicit declaration of function 'reallocarray'; > did you mean 'realloc'? [-Werror=implicit-function-declaration] > progs = reallocarray(progs, nr_progs + 1, sizeof(progs[0])); > > It was caused by feature-reallocarray=1 in FEATURE-DUMP.libbpf and it > was fixed by manually removing feature/ folder. This diff adds feature/ > to EXTRA_CLEAN to avoid this problem. > > Signed-off-by: Hechao Li <hechaol@xxxxxx> > --- There is no need to include v1 into patch prefix for a first version of a patch. Only v2 and further versions are added. > tools/testing/selftests/bpf/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > index 2b426ae1cdc9..44fb61f4d502 100644 > --- a/tools/testing/selftests/bpf/Makefile > +++ b/tools/testing/selftests/bpf/Makefile > @@ -279,4 +279,5 @@ $(OUTPUT)/verifier/tests.h: $(VERIFIER_TESTS_DIR) $(VERIFIER_TEST_FILES) > ) > $(VERIFIER_TESTS_H)) > > EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(ALU32_BUILD_DIR) \ > - $(VERIFIER_TESTS_H) $(PROG_TESTS_H) $(MAP_TESTS_H) > + $(VERIFIER_TESTS_H) $(PROG_TESTS_H) $(MAP_TESTS_H) \ > + feature It doesn't seem any of linux's Makefile do that. From brief reading of build/Makefile.feature, it seems like it is supposed to handle transparently the case where environment changes and thus a set of supported features changes. I also verified that FEATURE-DUMP.libbpf is re-generated every single time I run make in tools/testing/selftests/bpf, even if nothing changed at all. So I don't think this patch is necessary. I'm not sure what was the cause of your original problem, though. > -- > 2.17.1 >