From 2c891196683816585d9a4b9ae148f671299bbc1e Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Sat, 15 Aug 2020 11:11:11 -0500 Subject: [PATCH] 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 --- include/Makefile.am | 1 + include/tests.h | 2 ++ 2 files changed, 3 insertions(+) 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;