summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZane van Iperen <zane@zanevaniperen.com>2019-12-09 17:24:05 +1000
committerAlan Antonuk <alan.antonuk@gmail.com>2019-12-08 23:24:05 -0800
commitfef39faa56f803af6ab30e9a927437542048c42f (patch)
tree31653d713d26c16014803e167885c6060c8cef2e
parent7ea912f8c4fd384e4b5481e955b9210ed81cc4d3 (diff)
downloadrabbitmq-c-fef39faa56f803af6ab30e9a927437542048c42f.tar.gz
lib: fix openSSL symbol clash on win32 (#583)
Fix a compile error on win32 where OpenSSL and Win32 X509_* errors collide
-rw-r--r--librabbitmq/amqp_openssl_hostname_validation.c4
-rw-r--r--librabbitmq/amqp_openssl_hostname_validation.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/librabbitmq/amqp_openssl_hostname_validation.c b/librabbitmq/amqp_openssl_hostname_validation.c
index 133d73c..01cf740 100644
--- a/librabbitmq/amqp_openssl_hostname_validation.c
+++ b/librabbitmq/amqp_openssl_hostname_validation.c
@@ -27,6 +27,10 @@
* https://wiki.openssl.org/index.php/Hostname_validation
*/
+#if defined(_WIN32)
+#define WIN32_LEAN_AND_MEAN
+#endif
+
#include <openssl/ssl.h>
#include <openssl/x509v3.h>
diff --git a/librabbitmq/amqp_openssl_hostname_validation.h b/librabbitmq/amqp_openssl_hostname_validation.h
index c994871..3f353e3 100644
--- a/librabbitmq/amqp_openssl_hostname_validation.h
+++ b/librabbitmq/amqp_openssl_hostname_validation.h
@@ -30,7 +30,7 @@
* https://wiki.openssl.org/index.php/Hostname_validation
*/
-#include <openssl/x509v3.h>
+#include <openssl/ossl_typ.h>
typedef enum {
AMQP_HVR_MATCH_FOUND,