Skip to content

Commit fef39fa

Browse files
vs49688alanxz
authored andcommitted
lib: fix openSSL symbol clash on win32 (alanxz#583)
Fix a compile error on win32 where OpenSSL and Win32 X509_* errors collide
1 parent 7ea912f commit fef39fa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

librabbitmq/amqp_openssl_hostname_validation.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
* https://wiki.openssl.org/index.php/Hostname_validation
2828
*/
2929

30+
#if defined(_WIN32)
31+
#define WIN32_LEAN_AND_MEAN
32+
#endif
33+
3034
#include <openssl/ssl.h>
3135
#include <openssl/x509v3.h>
3236

librabbitmq/amqp_openssl_hostname_validation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* https://wiki.openssl.org/index.php/Hostname_validation
3131
*/
3232

33-
#include <openssl/x509v3.h>
33+
#include <openssl/ossl_typ.h>
3434

3535
typedef enum {
3636
AMQP_HVR_MATCH_FOUND,

0 commit comments

Comments
 (0)