[glib-networking/wip/openssl: 9/20] tls/openssl: Use WIN32_LEAN_AND_MEAN on Windows



commit 5f4904f132e842401c8651e0be9fdb5ed8ceff40
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Sep 3 14:41:59 2015 +0800

    tls/openssl: Use WIN32_LEAN_AND_MEAN on Windows
    
    We need to define WIN32_LEAN_AND_MEAN when necessary, before the Windows
    headers get included, as there would be a pretty bad clash on the type
    X509_NAME as the definition from wincrypt.h would be used if that macro
    is not defined.

 tls/openssl/gtlsclientconnection-openssl.c |    4 ++++
 tls/openssl/gtlsfiledatabase-openssl.h     |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/tls/openssl/gtlsclientconnection-openssl.c b/tls/openssl/gtlsclientconnection-openssl.c
index 15b7a00..c50355d 100644
--- a/tls/openssl/gtlsclientconnection-openssl.c
+++ b/tls/openssl/gtlsclientconnection-openssl.c
@@ -25,6 +25,10 @@
 #include "config.h"
 #include "glib.h"
 
+#ifdef G_OS_WIN32
+#define WIN32_LEAN_AND_MEAN
+#endif
+
 #include <errno.h>
 #include <openssl/ssl.h>
 #include <openssl/err.h>
diff --git a/tls/openssl/gtlsfiledatabase-openssl.h b/tls/openssl/gtlsfiledatabase-openssl.h
index c54731b..4ec6627 100644
--- a/tls/openssl/gtlsfiledatabase-openssl.h
+++ b/tls/openssl/gtlsfiledatabase-openssl.h
@@ -27,6 +27,10 @@
 
 #include <gio/gio.h>
 
+#ifdef G_OS_WIN32
+#define WIN32_LEAN_AND_MEAN
+#endif
+
 #include "gtlsdatabase-openssl.h"
 
 G_BEGIN_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]