You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.0 KiB

  1. --- a/src/fuse/mutex.c
  2. +++ b/src/fuse/mutex.c
  3. @@ -68,8 +68,13 @@ GNUNET_mutex_create (int isRecursive)
  4. if (isRecursive)
  5. {
  6. #ifdef __linux__
  7. +#if defined(__UCLIBC__) || defined(__GLIBC__)
  8. GNUNET_assert (0 == pthread_mutexattr_setkind_np
  9. (&attr, PTHREAD_MUTEX_RECURSIVE_NP));
  10. +#else
  11. + GNUNET_assert (0 == pthread_mutexattr_settype
  12. + (&attr, PTHREAD_MUTEX_RECURSIVE));
  13. +#endif
  14. #elif BSD || SOLARIS || OSX || WINDOWS
  15. GNUNET_assert (0 == pthread_mutexattr_settype
  16. (&attr, PTHREAD_MUTEX_RECURSIVE));
  17. @@ -78,11 +83,16 @@ GNUNET_mutex_create (int isRecursive)
  18. else
  19. {
  20. #ifdef __linux__
  21. +#if defined(__UCLIBC__) || defined(__GLIBC__)
  22. GNUNET_assert (0 == pthread_mutexattr_setkind_np
  23. (&attr, PTHREAD_MUTEX_ERRORCHECK_NP));
  24. #else
  25. GNUNET_assert (0 == pthread_mutexattr_settype
  26. (&attr, PTHREAD_MUTEX_ERRORCHECK));
  27. +#endif
  28. +#else
  29. + GNUNET_assert (0 == pthread_mutexattr_settype
  30. + (&attr, PTHREAD_MUTEX_ERRORCHECK));
  31. #endif
  32. }
  33. mut = GNUNET_new (struct GNUNET_Mutex);