0001-Fix-build-failure-on-musl.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 231c1fb97785290aaac89ed74d7cb24eaa74b363 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sun, 2 Sep 2018 12:05:22 +0200
  4. Subject: [PATCH] Fix build failure on musl
  5. Build fails on:
  6. /home/test/autobuild/run/instance-0/output/build/chipmunk-7.0.2/src/cpHastySpace.c:11:24: fatal error: sys/sysctl.h: No such file or directory
  7. Indeed, sys/sysctl.h is not available on musl so include this header
  8. only if __APPLE__ is defined as sysctlbyname is only used in this case.
  9. Fixes:
  10. - http://autobuild.buildroot.org/results/e5be2f8eb9315a9054e1c8d854dec37cbb28eed7
  11. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  12. [Upstream status: https://github.com/slembcke/Chipmunk2D/pull/171]
  13. ---
  14. src/cpHastySpace.c | 2 ++
  15. 1 file changed, 2 insertions(+)
  16. diff --git a/src/cpHastySpace.c b/src/cpHastySpace.c
  17. index 8dca425..e087df8 100644
  18. --- a/src/cpHastySpace.c
  19. +++ b/src/cpHastySpace.c
  20. @@ -8,7 +8,9 @@
  21. //#include <sys/param.h >
  22. #ifndef _WIN32
  23. +#ifdef __APPLE__
  24. #include <sys/sysctl.h>
  25. +#endif
  26. #include <pthread.h>
  27. #else
  28. #ifndef WIN32_LEAN_AND_MEAN
  29. --
  30. 2.17.1