--- a/src/fuse/mutex.c +++ b/src/fuse/mutex.c @@ -68,8 +68,13 @@ GNUNET_mutex_create (int isRecursive) if (isRecursive) { #ifdef __linux__ +#if defined(__UCLIBC__) || defined(__GLIBC__) GNUNET_assert (0 == pthread_mutexattr_setkind_np (&attr, PTHREAD_MUTEX_RECURSIVE_NP)); +#else + GNUNET_assert (0 == pthread_mutexattr_settype + (&attr, PTHREAD_MUTEX_RECURSIVE)); +#endif #elif BSD || SOLARIS || OSX || WINDOWS GNUNET_assert (0 == pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE)); @@ -78,11 +83,16 @@ GNUNET_mutex_create (int isRecursive) else { #ifdef __linux__ +#if defined(__UCLIBC__) || defined(__GLIBC__) GNUNET_assert (0 == pthread_mutexattr_setkind_np (&attr, PTHREAD_MUTEX_ERRORCHECK_NP)); #else GNUNET_assert (0 == pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_ERRORCHECK)); +#endif +#else + GNUNET_assert (0 == pthread_mutexattr_settype + (&attr, PTHREAD_MUTEX_ERRORCHECK)); #endif } mut = GNUNET_new (struct GNUNET_Mutex);