summaryrefslogtreecommitdiff
path: root/libusb/os/threads_windows.h
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-03-19 18:13:37 +0000
committerPete Batard <pbatard@gmail.com>2010-03-19 18:13:37 +0000
commite63267c4bb6f8edeb7431932a85d97a27fe3597a (patch)
tree348c4183d806aaf371f861e9c2a63f077a0cc5d6 /libusb/os/threads_windows.h
parent0758c0d9a9c6e26028dff3aff6fa3ed0b641f9c3 (diff)
downloadlibusb-e63267c4bb6f8edeb7431932a85d97a27fe3597a.tar.gz
added MinGW-w64 supportr219
struct timespec was not properly detected as defined and ftime generated warnings also fixed a missing EOF CR in poll_windows.c (why do these keep disappearing?)
Diffstat (limited to 'libusb/os/threads_windows.h')
-rw-r--r--libusb/os/threads_windows.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libusb/os/threads_windows.h b/libusb/os/threads_windows.h
index 52ae9c1..14fd662 100644
--- a/libusb/os/threads_windows.h
+++ b/libusb/os/threads_windows.h
@@ -41,13 +41,14 @@ struct usbi_cond_t_ {
typedef struct usbi_cond_t_ usbi_cond_t;
// We *were* getting timespec from pthread.h:
-#ifndef HAVE_STRUCT_TIMESPEC
+#if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED))
#define HAVE_STRUCT_TIMESPEC 1
+#define _TIMESPEC_DEFINED 1
struct timespec {
long tv_sec;
long tv_nsec;
};
-#endif /* HAVE_STRUCT_TIMESPEC */
+#endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */
// We *were* getting ETIMEDOUT from pthread.h:
#ifndef ETIMEDOUT