5656 /* default */
5757 #define XINET_NTOA inet_ntoa
5858 #define XINET_ATON inet_aton
59+ #ifdef FREESCALE_MQX
60+ #define XINET_PTON (a ,b ,c ,d ) inet_pton((a),(b),(c),(d))
61+ #else
5962 #define XINET_PTON (a ,b ,c ) inet_pton((a),(b),(c))
63+ #endif
6064 #define XINET_NTOP inet_ntop
6165 #define XINET_ADDR inet_addr
6266 #define XHTONS htons
6367 #define XNTOHS ntohs
6468 #define XHTONL htonl
6569 #define XNTOHL ntohl
70+ #ifdef FREESCALE_MQX
71+ #define XINADDR_NONE INADDR_BROADCAST
72+ #else
6673 #define XINADDR_NONE INADDR_NONE
6774#endif
75+ #endif
6876
6977#if !defined(WOLFCRYPT_ONLY ) && !defined(NO_FILESYSTEM )
7078#ifdef WOLFSSL_SNIFFER
7684 #ifdef TCP_PROTOCOL
7785 #undef TCP_PROTOCOL
7886 #endif
79- #else
87+ #elif !defined( FREESCALE_MQX )
8088 #ifndef _WIN32
8189 #include <arpa/inet.h>
8290 #else
@@ -1817,6 +1825,9 @@ static int SetNamedPrivateKey(const char* name, const char* address, int port,
18171825 #ifdef FUSION_RTOS
18181826 if (XINET_PTON (AF_INET6 , address , serverIp .ip6 ,
18191827 sizeof (serverIp .ip4 )) == 1 )
1828+ #elif defined(FREESCALE_MQX )
1829+ if (XINET_PTON (AF_INET6 , address , serverIp .ip6 ,
1830+ sizeof (serverIp .ip6 )) == RTCS_OK )
18201831 #else
18211832 if (XINET_PTON (AF_INET6 , address , serverIp .ip6 ) == 1 )
18221833 #endif
@@ -7672,6 +7683,9 @@ int ssl_RemoveSession(const char* clientIp, int clientPort,
76727683 #ifdef FUSION_RTOS
76737684 if (XINET_PTON (AF_INET6 , clientIp , clientAddr .ip6 ,
76747685 sizeof (clientAddr .ip4 )) == 1 )
7686+ #elif defined(FREESCALE_MQX )
7687+ if (XINET_PTON (AF_INET6 , clientIp , clientAddr .ip6 ,
7688+ sizeof (clientAddr .ip6 )) == RTCS_OK )
76757689 #else
76767690 if (XINET_PTON (AF_INET6 , clientIp , clientAddr .ip6 ) == 1 )
76777691 #endif
@@ -7691,6 +7705,9 @@ int ssl_RemoveSession(const char* clientIp, int clientPort,
76917705 #ifdef FUSION_RTOS
76927706 if (XINET_PTON (AF_INET6 , serverIp , serverAddr .ip6 ,
76937707 sizeof (serverAddr .ip4 )) == 1 )
7708+ #elif defined(FREESCALE_MQX )
7709+ if (XINET_PTON (AF_INET6 , clientIp , clientAddr .ip6 ,
7710+ sizeof (clientAddr .ip6 )) == RTCS_OK )
76947711 #else
76957712 if (XINET_PTON (AF_INET6 , serverIp , serverAddr .ip6 ) == 1 )
76967713 #endif
0 commit comments