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
863 B

  1. --- a/libteredo/debug.h 2009-02-28 23:17:14.000000000 +0300
  2. +++ b/libteredo/debug.h 2019-04-07 01:46:48.235087395 +0300
  3. @@ -43,8 +43,10 @@
  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 @@
  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)