diff --git a/libc/intrin/pthreadlock.c b/libc/intrin/pthreadlock.c index dccad6479f3..c7ef23ae498 100644 --- a/libc/intrin/pthreadlock.c +++ b/libc/intrin/pthreadlock.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/thread/posixthread.internal.h" -pthread_mutex_t _pthread_lock_obj = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; +pthread_mutex_t _pthread_lock_obj = PTHREAD_MUTEX_INITIALIZER; void _pthread_lock(void) { pthread_mutex_lock(&_pthread_lock_obj); diff --git a/libc/proc/fork.c b/libc/proc/fork.c index 8d9ec733acc..79a12b61ccb 100644 --- a/libc/proc/fork.c +++ b/libc/proc/fork.c @@ -86,7 +86,7 @@ static void _onfork_child(void) { __proc_wipe(); __fds_lock_obj = (pthread_mutex_t)PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; _rand64_lock_obj = (pthread_mutex_t)PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; - _pthread_lock_obj = (pthread_mutex_t)PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; + _pthread_lock_obj = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER; atomic_store_explicit(&__maps.lock, 0, memory_order_relaxed); if (_weaken(_pthread_onfork_child)) _weaken(_pthread_onfork_child)(); diff --git a/libc/str/wcwidth.c b/libc/str/wcwidth.c index fb8e076cb2a..379a11454f3 100644 --- a/libc/str/wcwidth.c +++ b/libc/str/wcwidth.c @@ -39,8 +39,8 @@ static const unsigned char wtable[] = { int wcwidth(wchar_t wc) { - if (wc < 0xff) { - if (wc >= 0) + if ((int)wc < 0xff) { + if ((int)wc >= 0) return ((wc+1) & 0x7f) >= 0x21 ? 1 : wc ? -1 : 0; return -1; }