Skip to content

Commit

Permalink
Work around silly Win defines to support BoringSSL (yhirose#1148)
Browse files Browse the repository at this point in the history
* Work around silly Win defines to support BoringSSL

* changes wrapped into ifdef(_WIN32) just in case
  • Loading branch information
witaly-iwanow authored Dec 30, 2021
1 parent 37fd4eb commit 4a7a81e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,14 @@ using socket_t = int;
#include <thread>

#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 <openssl/err.h>
#include <openssl/md5.h>
#include <openssl/ssl.h>
Expand Down

0 comments on commit 4a7a81e

Please sign in to comment.