diff options
author | Pete Batard <pbatard@gmail.com> | 2010-01-21 11:19:59 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-01-21 11:19:59 +0000 |
commit | c8bec80afba23b1d09151927e707c86c8bda504c (patch) | |
tree | 91a0ff36f958a2add7bc66ab9219ca51921a75c1 /libusb/os/windows_compat.h | |
parent | 3fa6b35e7e89f48749bf0d05d4d03e7ffe51f431 (diff) | |
download | libusb-c8bec80afba23b1d09151927e707c86c8bda504c.tar.gz |
r97: minor fixes for cygwin and sources
Diffstat (limited to 'libusb/os/windows_compat.h')
-rw-r--r-- | libusb/os/windows_compat.h | 8 |
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) { \ |