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>
This commit is contained in:
Steve Lhomme 2023-06-16 14:12:19 +02:00
parent d50a8cc77c
commit eb0f18acbc

View file

@ -2684,6 +2684,9 @@ find_parent:
#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() */