summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-02-21 17:43:35 +0100
committerIvan Maidanski <ivmai@mail.ru>2012-02-21 18:35:04 +0100
commit68756f05b1e4a22f79f68a62eec27fb2b395718c (patch)
tree213892b467232f9d01e611c73f363f390b424324 /tests
parent0ba0d226263968ca7021f55a8c7a6726ff8d586f (diff)
Fix gctest to include unistd.h if HANDLE_FORK
* tests/test.c: Include unistd.h for fork() declaration if HANDLE_FORK (and THREADS).
Diffstat (limited to 'tests')
-rw-r--r--tests/test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test.c b/tests/test.c
index fb49c95..dbe0af3 100644
--- a/tests/test.c
+++ b/tests/test.c
@@ -75,6 +75,10 @@
# include <pthread.h>
# endif
+# if defined(THREADS) && defined(HANDLE_FORK)
+# include <unistd.h>
+# endif
+
# if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
static CRITICAL_SECTION incr_cs;
# endif