fix wide printf forms ignoring width for %lc format specifier
[musl] / src / thread / mtx_unlock.c
index 5033ace..2e5c8cf 100644 (file)
@@ -1,11 +1,10 @@
 #include <threads.h>
-
-int __pthread_mutex_unlock(mtx_t *);
+#include <pthread.h>
 
 int mtx_unlock(mtx_t *mtx)
 {
        /* The only cases where pthread_mutex_unlock can return an
         * error are undefined behavior for C11 mtx_unlock, so we can
         * assume it does not return an error and simply tail call. */
-       return __pthread_mutex_unlock(mtx);
+       return __pthread_mutex_unlock((pthread_mutex_t *)mtx);
 }