From 5c2906a7c6156e9011690679c617502c119b8eee Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Wed, 13 Sep 2017 14:40:00 -0700 Subject: [PATCH] [WIP] Fixing win7 compilation issues. (#141) --- src/AspNetCore/Src/precomp.hxx | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/AspNetCore/Src/precomp.hxx b/src/AspNetCore/Src/precomp.hxx index e42cc92418..bdd540d23a 100644 --- a/src/AspNetCore/Src/precomp.hxx +++ b/src/AspNetCore/Src/precomp.hxx @@ -7,9 +7,12 @@ // // System related headers // -#define NTDDI_VERSION 0x06020000 -#define _WIN32_WINNT 0x0602 #define _WINSOCKAPI_ + +#define NTDDI_VERSION 0x06010000 +#define WINVER 0x0601 +#define _WIN32_WINNT 0x0601 + #include #include #include @@ -17,7 +20,25 @@ //#include #include #include + +// This should remove our issue of compiling for win7 without header files. +// We force the Windows 8 version check logic in iiswebsocket.h to succeed even though we're compiling for Windows 7. +// Then, we set the version defines back to Windows 7 to for the remainder of the compilation. +#undef NTDDI_VERSION +#undef WINVER +#undef _WIN32_WINNT +#define NTDDI_VERSION 0x06020000 +#define WINVER 0x0602 +#define _WIN32_WINNT 0x0602 #include +#undef NTDDI_VERSION +#undef WINVER +#undef _WIN32_WINNT + +#define NTDDI_VERSION 0x06010000 +#define WINVER 0x0601 +#define _WIN32_WINNT 0x0601 + #include #include