diff --git a/bacnet-stack/ports/win32/net.h b/bacnet-stack/ports/win32/net.h index ade64b10..e577854e 100644 --- a/bacnet-stack/ports/win32/net.h +++ b/bacnet-stack/ports/win32/net.h @@ -29,8 +29,13 @@ #define WIN32_LEAN_AND_MEAN #define STRICT 1 /* Windows XP minimum */ -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x501 +#if (_WIN32_WINNT < 0x501) + #undef _WIN32_WINNT + #define _WIN32_WINNT 0x501 + #undef NTDDI_VERSION + #define NTDDI_VERSION _NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT) +#endif + #include #if (!defined(USE_INADDR) || (USE_INADDR == 0)) && \ diff --git a/bacnet-stack/ports/win32/stdbool.h b/bacnet-stack/ports/win32/stdbool.h index 7eebc160..f7bccff5 100644 --- a/bacnet-stack/ports/win32/stdbool.h +++ b/bacnet-stack/ports/win32/stdbool.h @@ -8,10 +8,10 @@ #if !defined(__cplusplus) -#if !defined(__GNUC__) && !defined(_MSC_VER) +#if !defined(__GNUC__) /* _Bool builtin type is included in GCC */ -/* ISO C Standard: 5.2.5 An object declared as - type _Bool is large enough to store +/* ISO C Standard: 5.2.5 An object declared as + type _Bool is large enough to store the values 0 and 1. */ /* We choose 8 bit to match C++ */ /* It must also promote to integer */