summaryrefslogtreecommitdiff
path: root/libusb/os/threads_posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libusb/os/threads_posix.c')
-rw-r--r--libusb/os/threads_posix.c4
1 files changed, 4 insertions, 0 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;