Changeset 4c35dd214785bd12d7cf7b8489ae838cfb6cd633

Show
Ignore:
Timestamp:
05/08/08 20:58:38 (2 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1210273118 +0300
git-parent:

[3afd1ff1ab186f1f550469e9d4f656eff566ecbf]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1210273118 +0300
Message:

Fix the kludge for old glibc

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/misc/threads.c

    r3afd1ff r4c35dd2  
    182182} 
    183183 
    184 #ifdef __linux__ 
    185 /* This is not prototyped under Linux, though it exists. */ 
     184#if defined (__GLIBC__) && (__GLIBC_MINOR__ < 6) 
     185/* This is not prototyped under glibc, though it exists. */ 
    186186int pthread_mutexattr_setkind_np( pthread_mutexattr_t *attr, int kind ); 
    187187#endif 
     
    200200# ifndef NDEBUG 
    201201    /* Create error-checking mutex to detect problems more easily. */ 
    202 #  if defined(SYS_LINUX
     202#  if defined (__GLIBC__) && (__GLIBC_MINOR__ < 6
    203203    pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_ERRORCHECK_NP ); 
    204204#  else 
     
    251251 
    252252    pthread_mutexattr_init( &attr ); 
     253#  if defined (__GLIBC__) && (__GLIBC_MINOR__ < 6) 
     254    pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_RECURSIVE_NP ); 
     255#  else 
    253256    pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE ); 
     257#  endif 
    254258    i_result = pthread_mutex_init( p_mutex, &attr ); 
    255259    pthread_mutexattr_destroy( &attr );