From cb48057098382ce969dc09673502cef3b1517dc4 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 30 Dec 2010 00:39:07 +0100 Subject: threads: Fixed ssh_pthread_thread_id with mingw. --- src/threads/pthread.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/threads/pthread.c b/src/threads/pthread.c index fdfd27d..72c8ddc 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 = -- cgit