From: Antonio Alvarez Feijoo Date: Wed, 10 Apr 2024 09:07:32 +0000 (+0200) Subject: test: add missing header to test.h X-Git-Tag: v256-rc1~238^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=866a469e5a565b0ef5197107172c1d1f396c7b8d;p=thirdparty%2Fsystemd.git test: add missing header to test.h ``` ../src/shared/tests.h:361:28: error: implicit declaration of function ‘fork’ [-Werror=implicit-function-declaration] 361 | int _pid = fork(); \ | ^~~~ ../src/test/test-macro.c:1114:9: note: in expansion of macro ‘ASSERT_SIGNAL’ 1114 | ASSERT_SIGNAL(ASSERT_OK(-1), SIGABRT); | ^~~~~~~~~~~~~ ../src/shared/tests.h:369:25: error: implicit declaration of function ‘_exit’ [-Werror=implicit-function-declaration] 369 | _exit(EXIT_SUCCESS); \ | ^~~~~ ../src/test/test-macro.c:1114:9: note: in expansion of macro ‘ASSERT_SIGNAL’ 1114 | ASSERT_SIGNAL(ASSERT_OK(-1), SIGABRT); | ^~~~~~~~~~~~~ ../src/shared/tests.h:369:25: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch] 369 | _exit(EXIT_SUCCESS); \ | ^~~~~ ../src/test/test-macro.c:1114:9: note: in expansion of macro ‘ASSERT_SIGNAL’ 1114 | ASSERT_SIGNAL(ASSERT_OK(-1), SIGABRT); | ^~~~~~~~~~~~~ ../src/shared/tests.h:369:25: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch] 369 | _exit(EXIT_SUCCESS); \ | ^~~~~ ../src/test/test-macro.c:1115:9: note: in expansion of macro ‘ASSERT_SIGNAL’ 1115 | ASSERT_SIGNAL(ASSERT_OK(-ENOANO), SIGABRT); | ^~~~~~~~~~~~~ ../src/test/test-macro.c:1119:21: error: implicit declaration of function ‘getpid’; did you mean ‘getpt’? [-Werror=implicit-function-declaration] 1119 | ASSERT_TRUE(getpid()); | ^~~~~~ ``` Follow-up for #32189 --- diff --git a/src/shared/tests.h b/src/shared/tests.h index 07e05bf2676..1572ca71022 100644 --- a/src/shared/tests.h +++ b/src/shared/tests.h @@ -3,6 +3,7 @@ #include #include +#include #include "sd-daemon.h"