Changeset 4c35dd214785bd12d7cf7b8489ae838cfb6cd633
- 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
| r3afd1ff |
r4c35dd2 |
|
| 182 | 182 | } |
|---|
| 183 | 183 | |
|---|
| 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. */ |
|---|
| 186 | 186 | int pthread_mutexattr_setkind_np( pthread_mutexattr_t *attr, int kind ); |
|---|
| 187 | 187 | #endif |
|---|
| … | … | |
| 200 | 200 | # ifndef NDEBUG |
|---|
| 201 | 201 | /* Create error-checking mutex to detect problems more easily. */ |
|---|
| 202 | | # if defined(SYS_LINUX) |
|---|
| | 202 | # if defined (__GLIBC__) && (__GLIBC_MINOR__ < 6) |
|---|
| 203 | 203 | pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_ERRORCHECK_NP ); |
|---|
| 204 | 204 | # else |
|---|
| … | … | |
| 251 | 251 | |
|---|
| 252 | 252 | pthread_mutexattr_init( &attr ); |
|---|
| | 253 | # if defined (__GLIBC__) && (__GLIBC_MINOR__ < 6) |
|---|
| | 254 | pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_RECURSIVE_NP ); |
|---|
| | 255 | # else |
|---|
| 253 | 256 | pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE ); |
|---|
| | 257 | # endif |
|---|
| 254 | 258 | i_result = pthread_mutex_init( p_mutex, &attr ); |
|---|
| 255 | 259 | pthread_mutexattr_destroy( &attr ); |
|---|