summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-05-02 15:43:45 -0400
committerDmitry V. Levin <ldv@altlinux.org>2013-05-02 22:41:50 +0000
commitb51ce624548b13aeead20cf519567a1ee9349749 (patch)
treef2239fd743659e72cb638c1aa17b48ad166a89d1 /test
parent8582f881eecc08f7c633af4d49bc14bd96539454 (diff)
downloadstrace-b51ce624548b13aeead20cf519567a1ee9349749.tar.gz
strace-b51ce624548b13aeead20cf519567a1ee9349749.tar.bz2
strace-b51ce624548b13aeead20cf519567a1ee9349749.tar.xz
test: include headers for used funcs
These funcs use things like wait/write/read/strcmp but sometimes don't include the right header for them. * test/Makefile: Add -Wall to CFLAGS. * test/clone.c: Include unistd.h. * test/fork.c: Include sys/wait.h. * test/sig.c: Include unistd.h. * test/sigkill_rain.c: Include sys/wait.h. * test/vfork.c: Include sys/wait.h. * test/wait_must_be_interruptible.c: Include string.h
Diffstat (limited to 'test')
-rw-r--r--test/Makefile2
-rw-r--r--test/clone.c1
-rw-r--r--test/fork.c1
-rw-r--r--test/sig.c1
-rw-r--r--test/sigkill_rain.c1
-rw-r--r--test/vfork.c1
-rw-r--r--test/wait_must_be_interruptible.c1
7 files changed, 8 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
index c6ce99c..781e1f6 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,3 +1,5 @@
+CFLAGS += -Wall
+
all: \
vfork fork sig skodic clone leaderkill childthread \
sigkill_rain wait_must_be_interruptible threaded_execve
diff --git a/test/clone.c b/test/clone.c
index 5de302f..bdce8b1 100644
--- a/test/clone.c
+++ b/test/clone.c
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <sched.h>
+#include <unistd.h>
int child(void* arg)
{
diff --git a/test/fork.c b/test/fork.c
index 9bed1fe..1425e2d 100644
--- a/test/fork.c
+++ b/test/fork.c
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include <unistd.h>
+#include <sys/wait.h>
int main(int argc, char *argv[])
{
diff --git a/test/sig.c b/test/sig.c
index 60a9dc9..1678b02 100644
--- a/test/sig.c
+++ b/test/sig.c
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include <signal.h>
+#include <unistd.h>
void interrupt()
{
diff --git a/test/sigkill_rain.c b/test/sigkill_rain.c
index e2350db..59af55b 100644
--- a/test/sigkill_rain.c
+++ b/test/sigkill_rain.c
@@ -5,6 +5,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
+#include <sys/wait.h>
static const struct sockaddr sa;
diff --git a/test/vfork.c b/test/vfork.c
index 367dc01..f49a473 100644
--- a/test/vfork.c
+++ b/test/vfork.c
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include <unistd.h>
+#include <sys/wait.h>
int main(int argc, char *argv[])
{
diff --git a/test/wait_must_be_interruptible.c b/test/wait_must_be_interruptible.c
index 931ec4c..3fb3449 100644
--- a/test/wait_must_be_interruptible.c
+++ b/test/wait_must_be_interruptible.c
@@ -3,6 +3,7 @@
#include <signal.h>
#include <sys/wait.h>
#include <stdio.h>
+#include <string.h>
/* Expected order is:
* Child signals parent