diff --git a/include/sys/event.h b/include/sys/event.h index d080e705..5d9e6189 100644 --- a/include/sys/event.h +++ b/include/sys/event.h @@ -257,7 +257,7 @@ extern "C" { #ifdef _WIN32 -#if (_MSC_VER < 1900) +#if defined (_MSC_VER) && (_MSC_VER < 1900) struct timespec { time_t tv_sec; long tv_nsec; diff --git a/src/windows/platform.h b/src/windows/platform.h index 104b8205..e518825e 100644 --- a/src/windows/platform.h +++ b/src/windows/platform.h @@ -18,7 +18,9 @@ #define _KQUEUE_WINDOWS_PLATFORM_H /* Require Windows Server 2003 or later */ +#if WINVER < 0x0502 #define WINVER 0x0502 +#endif #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0502 #endif @@ -28,6 +30,7 @@ #include #include #include +#include #include "../common/queue.h"