diff --git a/ctaocrypt/src/random.c b/ctaocrypt/src/random.c index b1ea1e70d..27a63b386 100644 --- a/ctaocrypt/src/random.c +++ b/ctaocrypt/src/random.c @@ -33,7 +33,9 @@ #if defined(USE_WINDOWS_API) - #define _WIN32_WINNT 0x0400 + #ifndef _WIN32_WINNT + #define _WIN32_WINNT 0x0400 + #endif #include #include #else diff --git a/cyassl/internal.h b/cyassl/internal.h index 241783315..75eb69e4b 100644 --- a/cyassl/internal.h +++ b/cyassl/internal.h @@ -50,6 +50,10 @@ #ifdef CYASSL_GAME_BUILD #include "system/xtl.h" #else + #if defined(_WIN32_WCE) || defined(WIN32_LEAN_AND_MEAN) + /* On WinCE winsock2.h must be included before windows.h */ + #include + #endif #include #endif #elif defined(THREADX)