Commit cb2357f4 authored by Fabrice Fontaine's avatar Fabrice Fontaine
Browse files

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: default avatarThomas 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's avatarFabrice Fontaine <fontaine.fabrice@gmail.com>
parent 2982adec
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
#include <pixman.h> /* for version information */ #include <pixman.h> /* for version information */
#define SHOULD_FORK HAVE_FORK && HAVE_WAITPID #define SHOULD_FORK HAVE_FORK && HAVE_WAITPID
#if SHOULD_FORK
#if HAVE_UNISTD_H #if HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
#if SHOULD_FORK
#if HAVE_SIGNAL_H #if HAVE_SIGNAL_H
#include <signal.h> #include <signal.h>
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment