summaryrefslogtreecommitdiff
path: root/test/cairo-test-runner.c
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2020-02-03 21:24:25 +0100
committerFabrice Fontaine <fontaine.fabrice@gmail.com>2020-02-03 21:24:25 +0100
commitcb2357f481396820ec954dc4b69eafc01a8d162a (patch)
treedea99f3dfc4e81464206f1c74021b102f0c797a3 /test/cairo-test-runner.c
parent2982adec7698ef6cc55b6eb27f28200a95013cdc (diff)
downloadcairo-cb2357f481396820ec954dc4b69eafc01a8d162a.tar.gz
test: fix build when SHOULD_FORK is false
The code in test/cairo-test-runner.c properly takes into account platforms that do have fork() support, and uses the SHOULD_FORK define to know whether fork is available or not. However, this SHOULD_FORK macro is used to guard the inclusion of <unistd.h>, which is needed to get the prototype of other functions (namely readlink and getppid), that are used in portions of this file not guarded by SHOULD_FORK. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [Retrieved from: https://git.buildroot.net/buildroot/tree/package/cairo/0001-fix-nofork-build.patch] Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Diffstat (limited to 'test/cairo-test-runner.c')
-rw-r--r--test/cairo-test-runner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c
index f9e7d4712..b1f77b358 100644
--- a/test/cairo-test-runner.c
+++ b/test/cairo-test-runner.c
@@ -36,10 +36,10 @@
#include <pixman.h> /* for version information */
#define SHOULD_FORK HAVE_FORK && HAVE_WAITPID
-#if SHOULD_FORK
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
+#if SHOULD_FORK
#if HAVE_SIGNAL_H
#include <signal.h>
#endif