When running tests with "make check" on a host with gcc >= 14, tests/boot/init.c is failing to build with error: init.c:6:9: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 6 | puts("hello, KVM guest!\r"); init.c:8:9: error: implicit declaration of function 'reboot' [-Wimplicit-function-declaration] 8 | reboot(LINUX_REBOOT_CMD_RESTART); This is due to gcc 14 starting to treat implicit function declarations as error, by default. See [1]. This commit fixes the issue by including the appropriate headers ( for puts() and for reboot()). While at it, is also removed since it is not needed. [1] https://gcc.gnu.org/gcc-14/porting_to.html#implicit-function-declaration Signed-off-by: Julien Olivain --- tests/boot/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/boot/init.c b/tests/boot/init.c index 094f8ba..ea0d57f 100644 --- a/tests/boot/init.c +++ b/tests/boot/init.c @@ -1,5 +1,6 @@ #include -#include +#include +#include int main(int argc, char *argv[]) { -- 2.55.0