Skip to content

Commit 8f2a48c

Browse files
authored
Merge pull request #7073 from julek-wolfssl/move-mutex-init
Move the mutex initializer into the appropriate existing section
2 parents 62b3ca5 + 57355f3 commit 8f2a48c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

wolfssl/wolfcrypt/wc_port.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
typedef pthread_rwlock_t wolfSSL_RwLock;
244244
#endif
245245
typedef pthread_mutex_t wolfSSL_Mutex;
246+
#define WOLFSSL_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
246247
#elif defined(THREADX)
247248
typedef TX_MUTEX wolfSSL_Mutex;
248249
#elif defined(WOLFSSL_DEOS)
@@ -307,9 +308,6 @@
307308
#if !defined(WOLFSSL_USE_RWLOCK) || defined(SINGLE_THREADED)
308309
typedef wolfSSL_Mutex wolfSSL_RwLock;
309310
#endif
310-
#ifdef WOLFSSL_PTHREADS
311-
#define WOLFSSL_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
312-
#endif
313311

314312
#ifndef WOLFSSL_NO_ATOMICS
315313
#ifdef HAVE_C___ATOMIC

0 commit comments

Comments
 (0)