diff --git a/src/io.c b/src/io.c index c78883836..d7065df9e 100644 --- a/src/io.c +++ b/src/io.c @@ -61,18 +61,16 @@ #include #elif defined(FREESCALE_KSDK_MQX) #include - #elif defined(WOLFSSL_MDK_ARM) - #if defined(WOLFSSL_MDK5) + #elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET) + #if defined(WOLFSSL_MDK5) || defined(WOLFSSL_KEIL_TCP_NET) #include "cmsis_os.h" - #include "rl_fs.h" - #include "rl_net.h" + #include "rl_net.h" #else #include #endif - #undef RNG - #include "WOLFSSL_MDK_ARM.h" - #undef RNG - #define RNG wolfSSL_RNG + static int errno; + #define SOCKET_T int + #include "rl_net.h" /* for avoiding name conflict in "stm32f2xx.h" */ static int errno; #elif defined(WOLFSSL_TIRTOS) @@ -157,8 +155,8 @@ #define SOCKET_ECONNREFUSED NIO_ECONNREFUSED #define SOCKET_ECONNABORTED NIO_ECONNABORTED #endif -#elif defined(WOLFSSL_MDK_ARM) - #if defined(WOLFSSL_MDK5) +#elif defined(WOLFSSL_MDK_ARM)|| defined(WOLFSSL_KEIL_TCP_NET) + #if defined(WOLFSSL_MDK5)|| defined(WOLFSSL_KEIL_TCP_NET) #define SOCKET_EWOULDBLOCK BSD_ERROR_WOULDBLOCK #define SOCKET_EAGAIN BSD_ERROR_LOCKED #define SOCKET_ECONNRESET BSD_ERROR_CLOSED diff --git a/src/ssl.c b/src/ssl.c index fdbe8ce5d..60b199944 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -3492,13 +3492,6 @@ int wolfSSL_CTX_SetOCSP_Cb(WOLFSSL_CTX* ctx, CbOCSPIO ioCb, #ifndef NO_FILESYSTEM - #if defined(WOLFSSL_MDK_ARM) - extern FILE * wolfSSL_fopen(const char *name, const char *mode) ; - #define XFOPEN wolfSSL_fopen - #else - #define XFOPEN fopen - #endif - /* process a file with name fname into ctx of format and type userChain specifies a user certificate chain to pass during handshake */ int ProcessFile(WOLFSSL_CTX* ctx, const char* fname, int format, int type, @@ -7578,7 +7571,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl) #ifdef USE_WINDOWS_API #define CloseSocket(s) closesocket(s) -#elif defined(WOLFSSL_MDK_ARM) +#elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET) #define CloseSocket(s) closesocket(s) extern int closesocket(int) ; #else