diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/tls/config.m4 | 3 | ||||
-rw-r--r-- | source4/lib/tls/tls.c | 4 |
2 files changed, 7 insertions, 0 deletions
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; |