diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2015-11-02 07:21:46 -0500 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2015-11-03 18:53:53 -0500 |
commit | c1ee48315d9f0be2c11c61d388a3938c2d4b010a (patch) | |
tree | eee6df90fcd7621618563ab47e28b5c38a28372e | |
parent | fd88d16c58c2ad689a68d6790c789e7d5be3fc5b (diff) |
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
<linux/fcntl.h> and <sys/fcntl.h>.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
-rw-r--r-- | tools/testing/selftests/memfd/memfd_test.c | 1 | ||||
-rw-r--r-- | tools/testing/selftests/mqueue/mq_open_tests.c | 1 | ||||
-rw-r--r-- | tools/testing/selftests/mqueue/mq_perf_tests.c | 1 | ||||
-rw-r--r-- | tools/testing/selftests/timers/nanosleep.c | 1 |
4 files changed, 4 insertions, 0 deletions
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 @@ | |||
15 | #include <sys/mman.h> | 15 | #include <sys/mman.h> |
16 | #include <sys/stat.h> | 16 | #include <sys/stat.h> |
17 | #include <sys/syscall.h> | 17 | #include <sys/syscall.h> |
18 | #include <sys/wait.h> | ||
18 | #include <unistd.h> | 19 | #include <unistd.h> |
19 | 20 | ||
20 | #define MFD_DEF_SIZE 8192 | 21 | #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 @@ | |||
31 | #include <sys/resource.h> | 31 | #include <sys/resource.h> |
32 | #include <sys/stat.h> | 32 | #include <sys/stat.h> |
33 | #include <mqueue.h> | 33 | #include <mqueue.h> |
34 | #include <error.h> | ||
34 | 35 | ||
35 | static char *usage = | 36 | static char *usage = |
36 | "Usage:\n" | 37 | "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 @@ | |||
37 | #include <sys/stat.h> | 37 | #include <sys/stat.h> |
38 | #include <mqueue.h> | 38 | #include <mqueue.h> |
39 | #include <popt.h> | 39 | #include <popt.h> |
40 | #include <error.h> | ||
40 | 41 | ||
41 | static char *usage = | 42 | static char *usage = |
42 | "Usage:\n" | 43 | "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 @@ | |||
19 | * GNU General Public License for more details. | 19 | * GNU General Public License for more details. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <errno.h> | ||
22 | #include <stdio.h> | 23 | #include <stdio.h> |
23 | #include <stdlib.h> | 24 | #include <stdlib.h> |
24 | #include <time.h> | 25 | #include <time.h> |