mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
threads: use static error check mutex initializer if available
This changes the condition to use the static error check mutex
initializer. If it is not available, use the default static mutex
initializer.
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 0be1ae0e3b)
This commit is contained in:
committed by
Andreas Schneider
parent
c4d4731ddf
commit
220e6b66e8
@@ -29,7 +29,7 @@
|
||||
#include <pthread.h>
|
||||
#define SSH_MUTEX pthread_mutex_t
|
||||
|
||||
#if defined _GNU_SOURCE
|
||||
#if defined(PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP)
|
||||
#define SSH_MUTEX_STATIC_INIT PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
|
||||
#else
|
||||
#define SSH_MUTEX_STATIC_INIT PTHREAD_MUTEX_INITIALIZER
|
||||
|
||||
Reference in New Issue
Block a user