diff --git a/src/io.c b/src/io.c index 42b2fb090..c78883836 100644 --- a/src/io.c +++ b/src/io.c @@ -81,6 +81,9 @@ #include "FreeRTOS_Sockets.h" #elif defined(WOLFSSL_IAR_ARM) /* nothing */ + #elif defined(WOLFSSL_VXWORKS) + #include + #include #else #include #include diff --git a/wolfssl/test.h b/wolfssl/test.h index 89595872a..e488f9128 100644 --- a/wolfssl/test.h +++ b/wolfssl/test.h @@ -49,6 +49,19 @@ char **h_addr_list; /* list of addresses from name server */ }; #define SOCKET_T int +#elif defined(WOLFSSL_VXWORKS) + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #define SOCKET_T int #else #include #include @@ -420,6 +433,8 @@ static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer, struct hostent* entry = gethostbyname(peer, &err); #elif defined(WOLFSSL_TIRTOS) struct hostent* entry = DNSGetHostByName(peer); + #elif defined(WOLFSSL_VXWORKS) + struct hostent* entry = (struct hostent*)hostGetByName(peer); #else struct hostent* entry = gethostbyname(peer); #endif @@ -777,7 +792,8 @@ static INLINE void tcp_set_nonblocking(SOCKET_T* sockfd) int ret = ioctlsocket(*sockfd, FIONBIO, &blocking); if (ret == SOCKET_ERROR) err_sys("ioctlsocket failed"); - #elif defined(WOLFSSL_MDK_ARM) || defined (WOLFSSL_TIRTOS) + #elif defined(WOLFSSL_MDK_ARM) || defined (WOLFSSL_TIRTOS) \ + || defined(WOLFSSL_VXWORKS) /* non blocking not suppported, for now */ #else int flags = fcntl(*sockfd, F_GETFL, 0); diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 6c02013d9..8b3b743f3 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -111,7 +111,11 @@ #ifdef _MSC_VER #define INLINE __inline #elif defined(__GNUC__) - #define INLINE inline + #ifdef WOLFSSL_VXWORKS + #define INLINE __inline__ + #else + #define INLINE inline + #endif #elif defined(__IAR_SYSTEMS_ICC__) #define INLINE inline #elif defined(THREADX)