1

(2 replies, posted in wolfSSL)

Hello.
I have tried building CyaSSL with a little costomized preprocessor defines in the project:
setting _WIN32_WINNT to 0x0501
and define WIN32_LEAN_AND_MEAN

This made errors and warnings in the code.
To solve it there need to be edited to files:
internal.h:

#ifdef USE_WINDOWS_API 
    #ifdef CYASSL_GAME_BUILD
        #include "system/xtl.h"
    #else
        #include <windows.h>
    #endif
#elif defined(THREADX)

changed to:

#ifdef USE_WINDOWS_API 
    #ifdef CYASSL_GAME_BUILD
        #include "system/xtl.h"
    #else
        #include <windows.h>
        #include <WinSock2.h>
    #endif
#elif defined(THREADX)

random.c:

#if defined(USE_WINDOWS_API)
    #define _WIN32_WINNT 0x0400
    #include <windows.h>
    #include <wincrypt.h>
#else

changed to:

#if defined(USE_WINDOWS_API)
    #if !defined(_WIN32_WINNT)
        #define _WIN32_WINNT 0x0400
    #endif
    #include <windows.h>
    #include <wincrypt.h>
#else

Please fix it.
Thanks.