summaryrefslogtreecommitdiff
path: root/libusb/os/windows_compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'libusb/os/windows_compat.h')
-rw-r--r--libusb/os/windows_compat.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/libusb/os/windows_compat.h b/libusb/os/windows_compat.h
index 8cae332..f40f5de 100644
--- a/libusb/os/windows_compat.h
+++ b/libusb/os/windows_compat.h
@@ -77,12 +77,9 @@ struct winfd fd_to_winfd(int fd);
struct winfd handle_to_winfd(HANDLE handle);
struct winfd overlapped_to_winfd(OVERLAPPED* overlapped);
-// On Windows, timeval (defined in WinSock.h) uses long for its members
-
-/*
- * Structure used in select() call, taken from the BSD file sys/time.h.
- */
+// When building using the MSDDK and sources
#if defined(DDKBUILD)
+#if !defined(timeval)
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
@@ -102,6 +99,7 @@ struct timeval {
#if !defined(timerclr)
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#endif
+#endif
#if !defined(TIMESPEC_TO_TIMEVAL)
#define TIMESPEC_TO_TIMEVAL(tv, ts) { \