Windows: Fix missing cygwin thread ID

* Cygwin uses POSIX threads, not Windows threads
This commit is contained in:
Pete Batard 2012-05-10 17:42:16 +01:00
parent 75b1cf81db
commit 1cc9c6087d
2 changed files with 5 additions and 1 deletions

View 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;

View file

@ -1 +1 @@
#define LIBUSB_NANO 10504
#define LIBUSB_NANO 10505