Don't use inet_pton() before Windows Vista
On runtime it will attempt to get inet_pton() from ws2_32.dll
but it's not there and the DLL/program containing mbedtls will not load.
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 9b3414a..453389b 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -2684,6 +2684,9 @@
#elif (defined(__MINGW32__) || defined(__MINGW64__)) && _WIN32_WINNT >= 0x0600
#include <winsock2.h>
#include <ws2tcpip.h>
+#else
+/* inet_pton() is not supported, fallback to software version */
+#define MBEDTLS_TEST_SW_INET_PTON
#endif
#elif defined(__sun)
/* Solaris requires -lsocket -lnsl for inet_pton() */