From: Jim Warner Date: Sat, 15 Aug 2020 16:11:11 +0000 (-0500) Subject: build-sys: fix some important 'tests.h' related issues X-Git-Tag: v4.0.0~319 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c891196683816585d9a4b9ae148f671299bbc1e;p=procps-ng build-sys: fix some important 'tests.h' related issues Exploiting a header file shouldn't also force users to code their own '#include '. More importantly, unless this header is mentioned in dist_noinst_HEADERS we'd fail 'make distcheck' with the error shown below. [ the same error will apply to all 'noinst_PROGRAMS' ] [ that happen to use this header. but please, do not ] [ ask me to explain exactly why or how my fix works! ] Reference(s): ../../proc/test_pids.c:24:10: fatal error: tests.h: No such file or directory 24 | #include "tests.h" | ^~~~~~~~~ Signed-off-by: Jim Warner --- diff --git a/include/Makefile.am b/include/Makefile.am index 84fe3a6c..9f978905 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -6,4 +6,5 @@ dist_noinst_HEADERS = \ rpmatch.h \ signals.h \ strutils.h \ + tests.h \ xalloc.h diff --git a/include/tests.h b/include/tests.h index 1774f52d..324cc225 100644 --- a/include/tests.h +++ b/include/tests.h @@ -2,6 +2,8 @@ #ifndef PROCPS_NG_TESTS_H #define PROCPS_NG_TESTS_H +#include + typedef int (*TestFunction)(void *data); char *testname;