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