diff options
author | Russ Allbery <rra@dropbox.com> | 2016-02-03 12:44:33 -0800 |
---|---|---|
committer | Russ Allbery <rra@dropbox.com> | 2016-02-03 12:44:33 -0800 |
commit | 2a53df4444cb8a931e82c584288025e315f40121 (patch) | |
tree | 7c8b9bfa69cf613a22ba6be616a0d3fdb4146e4e /tests/tap/process.c | |
parent | 294d46a917b6aa3af305c3d50b8d83a1f3fb5694 (diff) | |
parent | e64d4e31146b87046916c377557f8ea789da3f0a (diff) |
Merge branch 'debian/master' into ubuntu/precise
Diffstat (limited to 'tests/tap/process.c')
-rw-r--r-- | tests/tap/process.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/tap/process.c b/tests/tap/process.c index 6461fb4..8c22324 100644 --- a/tests/tap/process.c +++ b/tests/tap/process.c @@ -47,8 +47,11 @@ # include <sys/select.h> #endif #include <sys/stat.h> -#include <sys/time.h> +#ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +#endif #include <sys/wait.h> +#include <time.h> #include <tests/tap/basic.h> #include <tests/tap/process.h> @@ -229,6 +232,10 @@ process_free(struct process *process) { struct process **prev; + /* Do nothing if called with a NULL argument. */ + if (process == NULL) + return; + /* Remove the process from the global list. */ prev = &processes; while (*prev != NULL && *prev != process) |