From 1cc9c6087d2074f2a8fbebb1ef25d0d889d17c90 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 10 May 2012 17:42:16 +0100 Subject: [PATCH] Windows: Fix missing cygwin thread ID * Cygwin uses POSIX threads, not Windows threads --- libusb/os/threads_posix.c | 4 ++++ libusb/version_nano.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libusb/os/threads_posix.c b/libusb/os/threads_posix.c index 20f279a..e18e69b 100644 --- a/libusb/os/threads_posix.c +++ b/libusb/os/threads_posix.c @@ -24,6 +24,8 @@ # include #elif defined(__APPLE__) # include +#elif defined(__CYGWIN__) +# include #endif #ifdef _XOPEN_SOURCE @@ -73,6 +75,8 @@ int usbi_get_tid(void) #elif defined(__APPLE__) ret = mach_thread_self(); mach_port_deallocate(mach_task_self(), ret); +#elif defined(__CYGWIN__) + ret = GetCurrentThreadId(); #endif /* TODO: NetBSD thread ID support */ return ret; diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 74a81bc..cd14787 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10504 +#define LIBUSB_NANO 10505 -- 2.7.4