[glib-networking/wip/openssl: 11/17] tls/openssl: Use WIN32_LEAN_AND_MEAN on Windows
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/wip/openssl: 11/17] tls/openssl: Use WIN32_LEAN_AND_MEAN on Windows
- Date: Wed, 23 Sep 2015 14:27:33 +0000 (UTC)
commit c09d3db539d40e9a6d595b65e4be9bf91a470f80
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]