make pthread attribute types structs, even when they just have one field
[musl] / src / thread / pthread_mutex_init.c
index a7ba39b..9d85a35 100644 (file)
@@ -3,6 +3,6 @@
 int pthread_mutex_init(pthread_mutex_t *restrict m, const pthread_mutexattr_t *restrict a)
 {
        *m = (pthread_mutex_t){0};
-       if (a) m->_m_type = *a & 7;
+       if (a) m->_m_type = a->__attr & 7;
        return 0;
 }