aboutsummaryrefslogtreecommitdiff
path: root/src/threads/pthread.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-12-30 00:39:07 +0100
committerAndreas Schneider <asn@cynapses.org>2010-12-30 00:39:07 +0100
commitcb48057098382ce969dc09673502cef3b1517dc4 (patch)
tree70c2049262b8f68558b34321e082b5ac44d47202 /src/threads/pthread.c
parentef91ac4ea0cdeae8ce712fe54219a706d4b0a8d3 (diff)
downloadlibssh-cb48057098382ce969dc09673502cef3b1517dc4.tar.gz
libssh-cb48057098382ce969dc09673502cef3b1517dc4.tar.xz
libssh-cb48057098382ce969dc09673502cef3b1517dc4.zip
threads: Fixed ssh_pthread_thread_id with mingw.
Diffstat (limited to 'src/threads/pthread.c')
-rw-r--r--src/threads/pthread.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/threads/pthread.c b/src/threads/pthread.c
index fdfd27d0..72c8ddce 100644
--- a/src/threads/pthread.c
+++ b/src/threads/pthread.c
@@ -75,7 +75,11 @@ static int ssh_pthread_mutex_unlock (void **lock){
}
static unsigned long ssh_pthread_thread_id (void){
- return (unsigned long) pthread_self();
+#if _WIN32
+ return (unsigned long) pthread_self().p;
+#else
+ return (unsigned long) pthread_self();
+#endif
}
static struct ssh_threads_callbacks_struct ssh_threads_pthread =