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.

24 lines
873 B

  1. --- a/libteredo/debug.h
  2. +++ b/libteredo/debug.h
  3. @@ -43,8 +43,10 @@ static inline void debug (const char *st
  4. # ifdef __linux__
  5. # include <errno.h>
  6. # include <assert.h>
  7. -# undef PTHREAD_MUTEX_INITIALIZER
  8. -# define PTHREAD_MUTEX_INITIALIZER PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
  9. +# if defined(PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP)
  10. +# undef PTHREAD_MUTEX_INITIALIZER
  11. +# define PTHREAD_MUTEX_INITIALIZER PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
  12. +# endif
  13. static inline int
  14. d_pthread_mutex_init (pthread_mutex_t *mutex, pthread_mutexattr_t *pattr)
  15. @@ -57,7 +59,7 @@ d_pthread_mutex_init (pthread_mutex_t *m
  16. pthread_mutexattr_init (&attr);
  17. }
  18. - pthread_mutexattr_settype (pattr, PTHREAD_MUTEX_ERRORCHECK_NP);
  19. + pthread_mutexattr_settype (pattr, PTHREAD_MUTEX_ERRORCHECK);
  20. int res = pthread_mutex_init (mutex, pattr);
  21. if (pattr == &attr)