From 3b66efbb6a4800b22a46c1ec3b3a01f9dba85171 Mon Sep 17 00:00:00 2001 From: RH Date: Thu, 16 Nov 2023 05:40:49 +1100 Subject: [PATCH] Fix C++/WinRT compile issue (#493) --- ixwebsocket/IXSocketOpenSSL.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ixwebsocket/IXSocketOpenSSL.cpp b/ixwebsocket/IXSocketOpenSSL.cpp index e37f3a6e..43d9bf3f 100644 --- a/ixwebsocket/IXSocketOpenSSL.cpp +++ b/ixwebsocket/IXSocketOpenSSL.cpp @@ -26,6 +26,7 @@ #ifdef _WIN32 // For manipulating the certificate store +#include #include #endif @@ -293,10 +294,16 @@ namespace ix */ bool SocketOpenSSL::checkHost(const std::string& host, const char* pattern) { +#if OPENSSL_VERSION_NUMBER >= 0x10100000L + return true; +#else + #ifdef _WIN32 return PathMatchSpecA(host.c_str(), pattern); #else return fnmatch(pattern, host.c_str(), 0) != FNM_NOMATCH; +#endif + #endif }