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
This commit is contained in:
Mike Frysinger 2013-05-02 15:43:45 -04:00 committed by Dmitry V. Levin
parent 8582f881ee
commit b51ce62454
7 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,5 @@
CFLAGS += -Wall
all: \
vfork fork sig skodic clone leaderkill childthread \
sigkill_rain wait_must_be_interruptible threaded_execve

View File

@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <sched.h>
#include <unistd.h>
int child(void* arg)
{

View File

@ -1,5 +1,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
int main(int argc, char *argv[])
{

View File

@ -1,5 +1,6 @@
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
void interrupt()
{

View 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;

View File

@ -1,5 +1,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
int main(int argc, char *argv[])
{

View File

@ -3,6 +3,7 @@
#include <signal.h>
#include <sys/wait.h>
#include <stdio.h>
#include <string.h>
/* Expected order is:
* Child signals parent