summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/os/tls.cxx2
-rw-r--r--common/os/tls.h9
2 files changed, 6 insertions, 5 deletions
diff --git a/common/os/tls.cxx b/common/os/tls.cxx
index cd67ce78..c0929968 100644
--- a/common/os/tls.cxx
+++ b/common/os/tls.cxx
@@ -32,7 +32,7 @@
using namespace std;
-#ifdef HAVE_GNUTLS
+#if defined(HAVE_GNUTLS) && !defined(WIN32)
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
diff --git a/common/os/tls.h b/common/os/tls.h
index 6dd0f324..8980197c 100644
--- a/common/os/tls.h
+++ b/common/os/tls.h
@@ -23,7 +23,11 @@
#include <config.h>
#endif
-#ifdef HAVE_GNUTLS
+/*
+ * Windows builds are build against fairly new GNUTLS, ignore compatibility
+ * code.
+ */
+#if defined(HAVE_GNUTLS) && !defined(WIN32)
#include <gnutls/gnutls.h>
#ifndef HAVE_GNUTLS_DATUM_T
@@ -40,9 +44,6 @@ typedef gnutls_sign_algorithm gnutls_sign_algorithm_t;
#endif
#ifndef HAVE_GNUTLS_X509_CRT_PRINT
-#ifdef WIN32
-#error "Please install more recent GNUTLS with gnutls_x509_crt_print() function"
-#endif
typedef enum {
GNUTLS_CRT_PRINT_ONELINE = 1