From a8835225c38421ab1002f15fbffc648a468d230b Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 7 Dec 2020 01:09:45 +0000 Subject: MFC r368190: Ensure that threading library is initialized in pthread_mutex_init(). --- lib/libthr/thread/thr_mutex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index 393e63e674b7..44f4d497b8e6 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -380,6 +380,8 @@ __pthread_mutex_init(pthread_mutex_t * __restrict mutex, struct pthread_mutex *pmtx; int ret; + _thr_check_init(); + if (mutex_attr != NULL) { ret = mutex_check_attr(*mutex_attr); if (ret != 0) -- cgit v1.2.3