From 4a7a81e039c216426b22d4787fc9c87528b2ca46 Mon Sep 17 00:00:00 2001 From: vitaly-ivanov <37587207+witaly-iwanow@users.noreply.github.com> Date: Thu, 30 Dec 2021 23:08:51 +0700 Subject: [PATCH] Work around silly Win defines to support BoringSSL (#1148) * Work around silly Win defines to support BoringSSL * changes wrapped into ifdef(_WIN32) just in case --- httplib.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/httplib.h b/httplib.h index 5c4e3b8..cb45f07 100644 --- a/httplib.h +++ b/httplib.h @@ -217,6 +217,14 @@ using socket_t = int; #include #ifdef CPPHTTPLIB_OPENSSL_SUPPORT +// these are defined in wincrypt.h and it breaks compilation if BoringSSL is used +#if defined(_WIN32) +#undef X509_NAME +#undef X509_CERT_PAIR +#undef X509_EXTENSIONS +#undef PKCS7_SIGNER_INFO +#endif + #include #include #include