diff options
author | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2018-08-13 11:49:52 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-08-13 12:00:13 +0200 |
commit | 0be1ae0e3b1e1467180c7548f55154109bfb83d2 (patch) | |
tree | a28b1c2e1407085df61da2f7edd3ba64bb2db079 /include | |
parent | 83898f3f6c89b55a806aba89549a970788aa4d29 (diff) | |
download | libssh-0be1ae0e3b1e1467180c7548f55154109bfb83d2.tar.gz libssh-0be1ae0e3b1e1467180c7548f55154109bfb83d2.tar.xz libssh-0be1ae0e3b1e1467180c7548f55154109bfb83d2.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/libssh/threads.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libssh/threads.h b/include/libssh/threads.h index e8ccf7be..522f91d5 100644 --- a/include/libssh/threads.h +++ b/include/libssh/threads.h @@ -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 |