Windows: Fix missing cygwin thread ID
authorPete Batard <pete@akeo.ie>
Thu, 10 May 2012 16:42:16 +0000 (17:42 +0100)
committerPete Batard <pete@akeo.ie>
Thu, 10 May 2012 16:42:16 +0000 (17:42 +0100)
* Cygwin uses POSIX threads, not Windows threads

libusb/os/threads_posix.c
libusb/version_nano.h

index 20f279a..e18e69b 100644 (file)
@@ -24,6 +24,8 @@
 # include <sys/syscall.h>
 #elif defined(__APPLE__)
 # include <mach/mach.h>
+#elif defined(__CYGWIN__)
+# include <windows.h>
 #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;
index 74a81bc..cd14787 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 10504
+#define LIBUSB_NANO 10505