mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-24 19:37:48 +03:00
threads: Fix building with POSIX threads in MinGW.
BUG: https://red.libssh.org/issues/181 Originally written by Patrick von Reth <vonreth () kde ! org>. This patch is part of the larger patch: https://projects.kde.org/projects/kdesupport/emerge/repository/revisions/master/changes/portage/win32libs/libssh/0002-add-a-way-to-test-ssh-connections-on-windows.patch MinGW (in particular, the MinGW-w64 fork) can use either posix threads or win32 threads. This patch fixes the MinGW build when using posix threads. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -75,7 +75,7 @@ static int ssh_pthread_mutex_unlock (void **lock){
|
||||
}
|
||||
|
||||
static unsigned long ssh_pthread_thread_id (void){
|
||||
#if _WIN32
|
||||
#if defined(_WIN32) && !defined(__WINPTHREADS_VERSION)
|
||||
return (unsigned long) pthread_self().p;
|
||||
#else
|
||||
return (unsigned long) pthread_self();
|
||||
|
||||
Reference in New Issue
Block a user