Merge branch 'master' of https://github.com/lchristina26/wolfssl into vxworks

This commit is contained in:
toddouska
2015-09-29 11:46:18 -07:00
3 changed files with 25 additions and 2 deletions

View File

@ -81,6 +81,9 @@
#include "FreeRTOS_Sockets.h" #include "FreeRTOS_Sockets.h"
#elif defined(WOLFSSL_IAR_ARM) #elif defined(WOLFSSL_IAR_ARM)
/* nothing */ /* nothing */
#elif defined(WOLFSSL_VXWORKS)
#include <sockLib.h>
#include <errno.h>
#else #else
#include <sys/types.h> #include <sys/types.h>
#include <errno.h> #include <errno.h>

View File

@ -49,6 +49,19 @@
char **h_addr_list; /* list of addresses from name server */ char **h_addr_list; /* list of addresses from name server */
}; };
#define SOCKET_T int #define SOCKET_T int
#elif defined(WOLFSSL_VXWORKS)
#include <hostLib.h>
#include <sockLib.h>
#include <arpa/inet.h>
#include <string.h>
#include <selectLib.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <sys/time.h>
#include <netdb.h>
#include <pthread.h>
#define SOCKET_T int
#else #else
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
@ -420,6 +433,8 @@ static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
struct hostent* entry = gethostbyname(peer, &err); struct hostent* entry = gethostbyname(peer, &err);
#elif defined(WOLFSSL_TIRTOS) #elif defined(WOLFSSL_TIRTOS)
struct hostent* entry = DNSGetHostByName(peer); struct hostent* entry = DNSGetHostByName(peer);
#elif defined(WOLFSSL_VXWORKS)
struct hostent* entry = (struct hostent*)hostGetByName(peer);
#else #else
struct hostent* entry = gethostbyname(peer); struct hostent* entry = gethostbyname(peer);
#endif #endif
@ -777,7 +792,8 @@ static INLINE void tcp_set_nonblocking(SOCKET_T* sockfd)
int ret = ioctlsocket(*sockfd, FIONBIO, &blocking); int ret = ioctlsocket(*sockfd, FIONBIO, &blocking);
if (ret == SOCKET_ERROR) if (ret == SOCKET_ERROR)
err_sys("ioctlsocket failed"); 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 */ /* non blocking not suppported, for now */
#else #else
int flags = fcntl(*sockfd, F_GETFL, 0); int flags = fcntl(*sockfd, F_GETFL, 0);

View File

@ -111,7 +111,11 @@
#ifdef _MSC_VER #ifdef _MSC_VER
#define INLINE __inline #define INLINE __inline
#elif defined(__GNUC__) #elif defined(__GNUC__)
#define INLINE inline #ifdef WOLFSSL_VXWORKS
#define INLINE __inline__
#else
#define INLINE inline
#endif
#elif defined(__IAR_SYSTEMS_ICC__) #elif defined(__IAR_SYSTEMS_ICC__)
#define INLINE inline #define INLINE inline
#elif defined(THREADX) #elif defined(THREADX)