diff options
Diffstat (limited to 'nptl/pthread_mutex_init.c')
-rw-r--r-- | nptl/pthread_mutex_init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/pthread_mutex_init.c b/nptl/pthread_mutex_init.c index 36da3f8..174d900 100644 --- a/nptl/pthread_mutex_init.c +++ b/nptl/pthread_mutex_init.c @@ -24,7 +24,7 @@ #include <stap-probe.h> -static const struct pthread_mutexattr default_attr = +static const struct pthread_mutexattr default_mutexattr = { /* Default is a normal mutex, not shared between processes. */ .mutexkind = PTHREAD_MUTEX_NORMAL @@ -45,7 +45,8 @@ __pthread_mutex_init (mutex, mutexattr) assert (sizeof (pthread_mutex_t) <= __SIZEOF_PTHREAD_MUTEX_T); - imutexattr = (const struct pthread_mutexattr *) mutexattr ?: &default_attr; + imutexattr = ((const struct pthread_mutexattr *) mutexattr + ?: &default_mutexattr); /* Sanity checks. */ switch (__builtin_expect (imutexattr->mutexkind |