1*4882a593Smuzhiyuntest: fix build when SHOULD_FORK is false 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThe code in test/cairo-test-runner.c properly takes into account 4*4882a593Smuzhiyunplatforms that do have fork() support, and uses the SHOULD_FORK define 5*4882a593Smuzhiyunto know whether fork is available or not. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunHowever, this SHOULD_FORK macro is used to guard the inclusion of 8*4882a593Smuzhiyun<unistd.h>, which is needed to get the prototype of other functions 9*4882a593Smuzhiyun(namely readlink and getppid), that are used in portions of this file 10*4882a593Smuzhiyunnot guarded by SHOULD_FORK. 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunIndex: b/test/cairo-test-runner.c 15*4882a593Smuzhiyun=================================================================== 16*4882a593Smuzhiyun--- a/test/cairo-test-runner.c 17*4882a593Smuzhiyun+++ b/test/cairo-test-runner.c 18*4882a593Smuzhiyun@@ -36,10 +36,10 @@ 19*4882a593Smuzhiyun #include <pixman.h> /* for version information */ 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun #define SHOULD_FORK HAVE_FORK && HAVE_WAITPID 22*4882a593Smuzhiyun-#if SHOULD_FORK 23*4882a593Smuzhiyun #if HAVE_UNISTD_H 24*4882a593Smuzhiyun #include <unistd.h> 25*4882a593Smuzhiyun #endif 26*4882a593Smuzhiyun+#if SHOULD_FORK 27*4882a593Smuzhiyun #if HAVE_SIGNAL_H 28*4882a593Smuzhiyun #include <signal.h> 29*4882a593Smuzhiyun #endif 30