From bdbfc6cfe744c5615861fda39e74f860e5405cd6 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 25 Aug 2019 16:49:10 -0400 Subject: [PATCH] Fix #210 --- httplib.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/httplib.h b/httplib.h index f2218f7..4f8397f 100644 --- a/httplib.h +++ b/httplib.h @@ -3252,6 +3252,7 @@ SSLClient::verify_host_with_subject_alt_name(X509 *server_cert) const { struct in_addr addr; size_t addr_len = 0; +#ifndef __MINGW32__ if (inet_pton(AF_INET6, host_.c_str(), &addr6)) { type = GEN_IPADD; addr_len = sizeof(struct in6_addr); @@ -3259,6 +3260,7 @@ SSLClient::verify_host_with_subject_alt_name(X509 *server_cert) const { type = GEN_IPADD; addr_len = sizeof(struct in_addr); } +#endif auto alt_names = static_cast( X509_get_ext_d2i(server_cert, NID_subject_alt_name, nullptr, nullptr));