From 997d6dccf3ee5faa74426073976859b6fa069c17 Mon Sep 17 00:00:00 2001 From: toddouska Date: Thu, 11 Apr 2013 14:52:04 -0700 Subject: [PATCH] fix windows ipv6 test w/ getaddrinfo --- cyassl/test.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);