[glib-networking] gnutls: Define EMSGSIZE on Windows systems
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] gnutls: Define EMSGSIZE on Windows systems
- Date: Fri, 6 Nov 2015 10:51:44 +0000 (UTC)
commit 9b28d301d6ab8ccda22ed19eafdd391d0a47cf83
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu Apr 3 13:08:20 2014 +0100
gnutls: Define EMSGSIZE on Windows systems
It isn’t clear whether all versions of MinGW define EMSGSIZE, so define
it to WSAEMSGSIZE as a fallback if it isn’t defined.
See:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms740668%28v=vs.85%29.aspx#wsaemsgsize
Based on a patch originally by Luciana Fujii
<luciana fujii collabora com>.
https://bugzilla.gnome.org/show_bug.cgi?id=697908
tls/gnutls/gtlsconnection-gnutls.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index 94d96a7..439d4d5 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -40,6 +40,16 @@
#include "pkcs11/gpkcs11pin.h"
#endif
+#ifdef G_OS_WIN32
+#include <winsock2.h>
+#include <winerror.h>
+
+/* It isn’t clear whether MinGW always defines EMSGSIZE. */
+#ifndef EMSGSIZE
+#define EMSGSIZE WSAEMSGSIZE
+#endif
+#endif
+
#include <glib/gi18n-lib.h>
static ssize_t g_tls_connection_gnutls_push_func (gnutls_transport_ptr_t transport_data,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]