]> granicus.if.org Git - check/commitdiff
Add missing header file when HAVE_FORK
authorMikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
Fri, 2 Aug 2019 04:15:19 +0000 (06:15 +0200)
committerMikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
Sun, 8 Sep 2019 07:31:04 +0000 (09:31 +0200)
Function _exit(int) is included in unistd.h. Also fork() is here.
Functions exit(int) (C89) and _Exit(int) (C99) are in stdlib.h.

Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
src/check.c

index c6cd22a0fb5fadb5d0e46b6311dab20e5d2712b1..d89b2a83eb27a7441d36117fb32db83428ff7ba2 100644 (file)
 #include <stdarg.h>
 #include <math.h>
 
+#if defined(HAVE_FORK) && HAVE_FORK==1
+#include <unistd.h>
+#endif /* HAVE_FORK */
+
 #include "check.h"
 #include "check_error.h"
 #include "check_list.h"