Skip to content

Commit ca76d54

Browse files
committed
Fix build when linking against musl
musl doesn't define `PTHREAD_MUTEX_RECURSIVE`, so it has to be done manually.
1 parent b07958e commit ca76d54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/VHACD_Lib/inc/vhacdMutex.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171
#include <pthread.h>
7272
#endif
7373

74-
#if defined(__APPLE__)
74+
// PTHREAD_MUTEX_RECURSIVE_NP isn't available in musl
75+
#if defined(__APPLE__) || !defined(__GLIBC__)
7576
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
7677
#endif
7778

0 commit comments

Comments
 (0)