The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / cairo / 0003-fix-nofork-build.patch
diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/cairo/0003-fix-nofork-build.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/cairo/0003-fix-nofork-build.patch
new file mode 100644 (file)
index 0000000..702e991
--- /dev/null
@@ -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