patch headers to avoid redefinitions on windows

This commit is contained in:
Scott Parker
2015-07-06 13:42:54 -07:00
committed by Brent Cook
parent b9291face3
commit 0bab46dde2
4 changed files with 65 additions and 0 deletions

20
patches/x509.h.patch Normal file
View File

@@ -0,0 +1,20 @@
--- include/openssl/x509.h.orig 2015-07-06 13:15:15.059306046 -0700
+++ include/openssl/x509.h 2015-07-06 13:16:10.506118278 -0700
@@ -112,6 +112,17 @@
extern "C" {
#endif
+#if defined(_WIN32) && defined(__WINCRYPT_H__)
+#ifdef _MSC_VER
+#pragma message("Warning, overriding WinCrypt defines")
+#else
+#warning overriding WinCrypt defines
+#endif
+#undef X509_NAME
+#undef X509_CERT_PAIR
+#undef X509_EXTENSIONS
+#endif
+
#define X509_FILETYPE_PEM 1
#define X509_FILETYPE_ASN1 2
#define X509_FILETYPE_DEFAULT 3