1*4882a593SmuzhiyunFrom dd37b97e79aea231ae026ac93c6ca4c7a2667582 Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3*4882a593SmuzhiyunDate: Sat, 7 Aug 2021 17:11:24 +0200 4*4882a593SmuzhiyunSubject: [PATCH] Extras/VHACD/inc/vhacdMutex.h: fix musl build 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunFix the following build failure on musl (which does not provide 7*4882a593SmuzhiyunPTHREAD_MUTEX_RECURSIVE_NP): 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunIn file included from /tmp/instance-5/output-1/build/bullet-3.09/src/LinearMath/btScalar.h:289, 10*4882a593Smuzhiyun from /tmp/instance-5/output-1/build/bullet-3.09/src/LinearMath/btVector3.h:19, 11*4882a593Smuzhiyun from /tmp/instance-5/output-1/build/bullet-3.09/src/LinearMath/btConvexHullComputer.h:18, 12*4882a593Smuzhiyun from /tmp/instance-5/output-1/build/bullet-3.09/Extras/VHACD/src/VHACD.cpp:28: 13*4882a593Smuzhiyun/tmp/instance-5/output-1/build/bullet-3.09/Extras/BulletRobotics/../../Extras/VHACD/inc/vhacdMutex.h: In constructor 'VHACD::Mutex::Mutex()': 14*4882a593Smuzhiyun/tmp/instance-5/output-1/build/bullet-3.09/Extras/BulletRobotics/../../Extras/VHACD/inc/vhacdMutex.h:97:54: error: 'PTHREAD_MUTEX_RECURSIVE_NP' was not declared in this scope; did you mean 'PTHREAD_MUTEX_RECURSIVE'? 15*4882a593Smuzhiyun 97 | VHACD_VERIFY(pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_RECURSIVE_NP) == 0); 16*4882a593Smuzhiyun | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunFixes: 19*4882a593Smuzhiyun - http://autobuild.buildroot.org/results/79cd2024b3dfc8d3e896cdacf67fb891df81ca6e 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 22*4882a593Smuzhiyun[Upstream status: https://github.com/bulletphysics/bullet3/pull/3930] 23*4882a593Smuzhiyun--- 24*4882a593Smuzhiyun Extras/VHACD/inc/vhacdMutex.h | 2 +- 25*4882a593Smuzhiyun 1 file changed, 1 insertion(+), 1 deletion(-) 26*4882a593Smuzhiyun 27*4882a593Smuzhiyundiff --git a/Extras/VHACD/inc/vhacdMutex.h b/Extras/VHACD/inc/vhacdMutex.h 28*4882a593Smuzhiyunindex 4d1ad2a7d..78c111383 100644 29*4882a593Smuzhiyun--- a/Extras/VHACD/inc/vhacdMutex.h 30*4882a593Smuzhiyun+++ b/Extras/VHACD/inc/vhacdMutex.h 31*4882a593Smuzhiyun@@ -69,7 +69,7 @@ 32*4882a593Smuzhiyun #include <pthread.h> 33*4882a593Smuzhiyun #endif 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun-#if defined(__APPLE__) 36*4882a593Smuzhiyun+#if defined(__APPLE__) || !defined(__GLIBC__) 37*4882a593Smuzhiyun #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE 38*4882a593Smuzhiyun #endif 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun-- 41*4882a593Smuzhiyun2.30.2 42*4882a593Smuzhiyun 43