modify library/net.c to use polarssl_snprintf
diff --git a/library/net.c b/library/net.c
index a8591ed..023e0e3 100644
--- a/library/net.c
+++ b/library/net.c
@@ -129,6 +129,12 @@
(((unsigned long )(n) & 0xFF000000) >> 24))
#endif
+#if defined(POLARSSL_PLATFORM_C)
+#include "polarssl/platform.h"
+#else
+#define polarssl_snprintf snprintf
+#endif
+
unsigned short net_htons( unsigned short n );
unsigned long net_htonl( unsigned long n );
#define net_htons(n) POLARSSL_HTONS(n)
@@ -173,7 +179,7 @@
/* getaddrinfo expects port as a string */
memset( port_str, 0, sizeof( port_str ) );
- snprintf( port_str, sizeof( port_str ), "%d", port );
+ polarssl_snprintf( port_str, sizeof( port_str ), "%d", port );
/* Do name resolution with both IPv6 and IPv4, but only TCP */
memset( &hints, 0, sizeof( hints ) );
@@ -259,7 +265,7 @@
/* getaddrinfo expects port as a string */
memset( port_str, 0, sizeof( port_str ) );
- snprintf( port_str, sizeof( port_str ), "%d", port );
+ polarssl_snprintf( port_str, sizeof( port_str ), "%d", port );
/* Bind to IPv6 and/or IPv4, but only in TCP */
memset( &hints, 0, sizeof( hints ) );