From 976b01b01a057de168355f5eab8c6f7caee0a4c1 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 4 Aug 2006 23:46:03 +0000 Subject: r17411: Try and compile on older versions of GnuTLS. Andrew Bartlett (This used to be commit 798c0791d8e8d10dde41a6dbceb0866265f9a709) --- source4/lib/tls/config.m4 | 3 +++ source4/lib/tls/tls.c | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'source4/lib') diff --git a/source4/lib/tls/config.m4 b/source4/lib/tls/config.m4 index 18dbea1e5f..1e4d61f6fe 100644 --- a/source4/lib/tls/config.m4 +++ b/source4/lib/tls/config.m4 @@ -17,6 +17,9 @@ if test x$SMB_ENABLE_GNUTLS = xNO; then SMB_EXT_LIB(GNUTLS, $GNUTLS_LIBS) fi if test x$SMB_ENABLE_GNUTLS = xYES; then + #Some older versions have a different type name + AC_CHECK_TYPES([gnutls_datum],,,[#include "gnutls/gnutls.h"]) + AC_CHECK_TYPES([gnutls_datum_t],,,[#include "gnutls/gnutls.h"]) AC_DEFINE(HAVE_LIBGNUTLS,1,[Whether we have gnutls support (SSL)]) fi # end SMB_EXT_LIB_GNUTLS diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c index 2a02ffa237..5679b5096d 100644 --- a/source4/lib/tls/tls.c +++ b/source4/lib/tls/tls.c @@ -31,6 +31,10 @@ #define DH_BITS 1024 +#if defined(HAVE_GNUTLS_DATUM) && !defined(HAVE_GNUTLS_DATUM_T) +typedef gnutls_datum gnutls_datum_t +#endif + /* hold persistent tls data */ struct tls_params { gnutls_certificate_credentials x509_cred; -- cgit