]> granicus.if.org Git - strace/commitdiff
test: include headers for used funcs
authorMike Frysinger <vapier@gentoo.org>
Thu, 2 May 2013 19:43:45 +0000 (15:43 -0400)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 2 May 2013 22:41:50 +0000 (22:41 +0000)
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

test/Makefile
test/clone.c
test/fork.c
test/sig.c
test/sigkill_rain.c
test/vfork.c
test/wait_must_be_interruptible.c

index c6ce99cdd35d1c5735cb5f4c343354029e723e55..781e1f68c3bd374cc64a8ea25e0a214ac1055765 100644 (file)
@@ -1,3 +1,5 @@
+CFLAGS += -Wall
+
 all: \
     vfork fork sig skodic clone leaderkill childthread \
     sigkill_rain wait_must_be_interruptible threaded_execve
index 5de302f8eabdd74bec00f87aaa44626f2412a69b..bdce8b19b65fd8df697bd2061764acf91d3bf3f1 100644 (file)
@@ -4,6 +4,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <sched.h>
+#include <unistd.h>
 
 int child(void* arg)
 {
index 9bed1fe48668426d50e00f6d2b32b4be1e7e6f8f..1425e2dd3e3d457ebfff61fe4c9cc1af3ece7cf9 100644 (file)
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <unistd.h>
+#include <sys/wait.h>
 
 int main(int argc, char *argv[])
 {
index 60a9dc9e3dc097cab9127ee533029be0b2212004..1678b0227aff78499f1f43e558b21504f06b3ba3 100644 (file)
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <signal.h>
+#include <unistd.h>
 
 void interrupt()
 {
index e2350dbdb7501e48a55a72bc12accac08e8fb203..59af55b2779926d5c66e1be200261da00ade4708 100644 (file)
@@ -5,6 +5,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <stdio.h>
+#include <sys/wait.h>
 
 static const struct sockaddr sa;
 
index 367dc0194eaf6f040873152ad01aaf4fcd7730bf..f49a47338aa8f873e87961a05a5bfd1eafd6b216 100644 (file)
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <unistd.h>
+#include <sys/wait.h>
 
 int main(int argc, char *argv[])
 {
index 931ec4ce20ea0b9c0a124859587434c412cb604f..3fb344977345b3ad25d435a7772979ffbcab95b4 100644 (file)
@@ -3,6 +3,7 @@
 #include <signal.h>
 #include <sys/wait.h>
 #include <stdio.h>
+#include <string.h>
 
 /* Expected order is:
  * Child signals parent