Commit 4428a700 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix forward compatibility with glibc > 2

parent 53c895bc
...@@ -145,7 +145,7 @@ void vlc_mutex_init( vlc_mutex_t *p_mutex ) ...@@ -145,7 +145,7 @@ void vlc_mutex_init( vlc_mutex_t *p_mutex )
pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_NORMAL ); pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_NORMAL );
#else #else
/* Create error-checking mutex to detect problems more easily. */ /* Create error-checking mutex to detect problems more easily. */
# if defined (__GLIBC__) && (__GLIBC_MINOR__ < 6) # if defined (__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ < 6)
pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_ERRORCHECK_NP ); pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_ERRORCHECK_NP );
# else # else
pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_ERRORCHECK ); pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_ERRORCHECK );
...@@ -164,7 +164,7 @@ void vlc_mutex_init_recursive( vlc_mutex_t *p_mutex ) ...@@ -164,7 +164,7 @@ void vlc_mutex_init_recursive( vlc_mutex_t *p_mutex )
pthread_mutexattr_t attr; pthread_mutexattr_t attr;
pthread_mutexattr_init( &attr ); pthread_mutexattr_init( &attr );
#if defined (__GLIBC__) && (__GLIBC_MINOR__ < 6) #if defined (__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ < 6)
pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_RECURSIVE_NP ); pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_RECURSIVE_NP );
#else #else
pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE ); pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment