From c1ee48315d9f0be2c11c61d388a3938c2d4b010a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 2 Nov 2015 12:21:46 +0000 Subject: [PATCH] selftests: Add missing #include directives Several C programs fail to include the headers declaring all the functions they call, resulting in warnings or errors. After this, memfd_test.c is still missing some function declarations but can't easily get them because of a conflict between and . Signed-off-by: Ben Hutchings Signed-off-by: Shuah Khan --- tools/testing/selftests/memfd/memfd_test.c | 1 + tools/testing/selftests/mqueue/mq_open_tests.c | 1 + tools/testing/selftests/mqueue/mq_perf_tests.c | 1 + tools/testing/selftests/timers/nanosleep.c | 1 + 4 files changed, 4 insertions(+) diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c index aa5d3ebbd760..26546892cd54 100644 --- a/tools/testing/selftests/memfd/memfd_test.c +++ b/tools/testing/selftests/memfd/memfd_test.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #define MFD_DEF_SIZE 8192 diff --git a/tools/testing/selftests/mqueue/mq_open_tests.c b/tools/testing/selftests/mqueue/mq_open_tests.c index 9c1a5d359055..e0a74bd207a5 100644 --- a/tools/testing/selftests/mqueue/mq_open_tests.c +++ b/tools/testing/selftests/mqueue/mq_open_tests.c @@ -31,6 +31,7 @@ #include #include #include +#include static char *usage = "Usage:\n" diff --git a/tools/testing/selftests/mqueue/mq_perf_tests.c b/tools/testing/selftests/mqueue/mq_perf_tests.c index 8519e9ee97e3..8188f72de93c 100644 --- a/tools/testing/selftests/mqueue/mq_perf_tests.c +++ b/tools/testing/selftests/mqueue/mq_perf_tests.c @@ -37,6 +37,7 @@ #include #include #include +#include static char *usage = "Usage:\n" diff --git a/tools/testing/selftests/timers/nanosleep.c b/tools/testing/selftests/timers/nanosleep.c index 8a3c29de7d49..ff942ff7c9b3 100644 --- a/tools/testing/selftests/timers/nanosleep.c +++ b/tools/testing/selftests/timers/nanosleep.c @@ -19,6 +19,7 @@ * GNU General Public License for more details. */ +#include #include #include #include -- 2.20.1