From: Tycho Andersen Date: Sat, 19 Jan 2019 00:12:14 +0000 (-0700) Subject: selftest: include stdio.h in kselftest.h X-Git-Tag: v5.1-rc1~95^2~11 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a18261d71bbc625bc32abbcded71acc408cca393;p=linux.git selftest: include stdio.h in kselftest.h While playing around with a way to skip the seccomp get_metadata test, I noticed that this header uses printf() without defining it, leading to, ../kselftest.h: In function ‘ksft_print_header’: ../kselftest.h:61:3: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] printf("TAP version 13\n"); ^~~~~~ ../kselftest.h:61:3: warning: incompatible implicit declaration of built-in function ‘printf’ ../kselftest.h:61:3: note: include ‘’ or provide a declaration of ‘printf’ if user code doesn't also use printf. Signed-off-by: Tycho Andersen Acked-by: Kees Cook Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h index a3edb2c8e43d..47e1d995c182 100644 --- a/tools/testing/selftests/kselftest.h +++ b/tools/testing/selftests/kselftest.h @@ -13,6 +13,7 @@ #include #include #include +#include /* define kselftest exit codes */ #define KSFT_PASS 0