diff --git a/cyassl/test.h b/cyassl/test.h index 94a556b65..0e753c725 100644 --- a/cyassl/test.h +++ b/cyassl/test.h @@ -18,6 +18,7 @@ #include #endif #define SOCKET_T unsigned int + #define SNPRINTF _snprintf #else #include #include @@ -40,6 +41,7 @@ #ifndef SO_NOSIGPIPE #include /* ignore SIGPIPE */ #endif + #define SNPRINTF snprintf #endif /* USE_WINDOWS_API */ #ifdef HAVE_CAVIUM @@ -384,7 +386,7 @@ static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer, hints.ai_socktype = udp ? SOCK_DGRAM : SOCK_STREAM; hints.ai_protocol = udp ? IPPROTO_UDP : IPPROTO_TCP; - snprintf(strPort, sizeof(strPort), "%d", port); + SNPRINTF(strPort, sizeof(strPort), "%d", port); strPort[79] = '\0'; ret = getaddrinfo(peer, strPort, &hints, &answer);