diff options
| author | Andreas Schneider <asn@cryptomilk.org> | 2015-01-20 19:01:15 +0100 |
|---|---|---|
| committer | Andreas Schneider <asn@cryptomilk.org> | 2015-01-20 19:03:08 +0100 |
| commit | 08c33d6aeba3561a7e64ff9bc2135ed9a1f657d3 (patch) | |
| tree | 3912d06228d85b8390c11bc57f8aeea7c36c24be | |
| parent | fa4740bdf53eeffef2d6597ed2ea90bcaaef4ae7 (diff) | |
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>
(cherry picked from commit 433f8fd5502841279aae6f416c81bb70f42d1734)
| -rw-r--r-- | src/threads/pthread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/threads/pthread.c b/src/threads/pthread.c index 829fa5c6..a0a266d7 100644 --- a/src/threads/pthread.c +++ b/src/threads/pthread.c @@ -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(); |
