0001-fix-nofork-build.patch 940 B

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