summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2012-05-10 17:42:16 +0100
committerPete Batard <pete@akeo.ie>2012-05-10 17:42:16 +0100
commit1cc9c6087d2074f2a8fbebb1ef25d0d889d17c90 (patch)
treeaa7389b347630d690ad98c0cf4b131e887263606
parent75b1cf81db74357f55cc4d0f596ef19a6a25c5cd (diff)
downloadlibusbx-1cc9c6087d2074f2a8fbebb1ef25d0d889d17c90.tar.gz
Windows: Fix missing cygwin thread ID
* Cygwin uses POSIX threads, not Windows threads
-rw-r--r--libusb/os/threads_posix.c4
-rw-r--r--libusb/version_nano.h2
2 files changed, 5 insertions, 1 deletions
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 <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;
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