r17411: Try and compile on older versions of GnuTLS.
authorAndrew Bartlett <abartlet@samba.org>
Fri, 4 Aug 2006 23:46:03 +0000 (23:46 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:15:22 +0000 (14:15 -0500)
Andrew Bartlett
(This used to be commit 798c0791d8e8d10dde41a6dbceb0866265f9a709)

source4/lib/tls/config.m4
source4/lib/tls/tls.c

index 18dbea1e5fef0b857e05ac67740c11652e97659b..1e4d61f6fec08218323d62af76c7e3164ab2aae5 100644 (file)
@@ -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
index 2a02ffa23758f400a332fe5faf6b92637b7c0e37..5679b5096d589cf0780a376c0f58bf1e3ecb96a6 100644 (file)
 
 #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;