Windows: Fix missing cygwin thread ID
* Cygwin uses POSIX threads, not Windows threads
This commit is contained in:
parent
75b1cf81db
commit
1cc9c6087d
2 changed files with 5 additions and 1 deletions
|
@ -24,6 +24,8 @@
|
||||||
# include <sys/syscall.h>
|
# include <sys/syscall.h>
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
# include <mach/mach.h>
|
# include <mach/mach.h>
|
||||||
|
#elif defined(__CYGWIN__)
|
||||||
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _XOPEN_SOURCE
|
#ifdef _XOPEN_SOURCE
|
||||||
|
@ -73,6 +75,8 @@ int usbi_get_tid(void)
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
ret = mach_thread_self();
|
ret = mach_thread_self();
|
||||||
mach_port_deallocate(mach_task_self(), ret);
|
mach_port_deallocate(mach_task_self(), ret);
|
||||||
|
#elif defined(__CYGWIN__)
|
||||||
|
ret = GetCurrentThreadId();
|
||||||
#endif
|
#endif
|
||||||
/* TODO: NetBSD thread ID support */
|
/* TODO: NetBSD thread ID support */
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#define LIBUSB_NANO 10504
|
#define LIBUSB_NANO 10505
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue