aboutsummaryrefslogtreecommitdiff
path: root/package/cairo
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-02-23 23:58:05 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-02-24 08:58:01 +0100
commit46831ea58a41e042cb2cd6005fd8269f4ef0d047 (patch)
tree32f8d85d1967648a30be539f9639ab6d5aab6fc4 /package/cairo
parentfc82f8df85b4023ed8fe382a1cc5369f12d550f0 (diff)
downloadbuildroot-46831ea58a41e042cb2cd6005fd8269f4ef0d047.tar.gz
buildroot-46831ea58a41e042cb2cd6005fd8269f4ef0d047.tar.bz2
cairo: fix build on Blackfin in test/cairo-test-runner.c
Add a patch for Cairo that ensures <unistd.h> is properly included to get the prototype of readlink and getppid even on non-MMU platforms. Fixes: http://autobuild.buildroot.net/results/93a97f90345d193b52035b2dc7559a306e11098e/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/cairo')
-rw-r--r--package/cairo/cairo-003-fix-nofork-build.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/package/cairo/cairo-003-fix-nofork-build.patch b/package/cairo/cairo-003-fix-nofork-build.patch
new file mode 100644
index 0000000000..702e9910a5
--- /dev/null
+++ b/package/cairo/cairo-003-fix-nofork-build.patch
@@ -0,0 +1,29 @@
+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>
+
+Index: b/test/cairo-test-runner.c
+===================================================================
+--- 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