diff --git a/configure.ac b/configure.ac index 2055637d7f..a9ee0bb6cc 100644 --- a/configure.ac +++ b/configure.ac @@ -1103,10 +1103,15 @@ if test "x$with_gnutls" != "xno"; then dnl it explicitly for the calls to gcry_control/check_version GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt" - dnl We're not using gcrypt deprecated features so define GCRYPT_NO_DEPRECATED - dnl to avoid deprecated warnings + dnl We're not using gcrypt deprecated features so define + dnl GCRYPT_NO_DEPRECATED to avoid deprecated warnings GNUTLS_CFLAGS="$GNUTLS_CFLAGS -DGCRYPT_NO_DEPRECATED" + dnl gnutls 3.x moved some declarations to a new header + AC_CHECK_HEADERS([gnutls/crypto.h], [], [], [[ + #include + ]]) + with_gnutls=yes fi diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c index e29c4392b2..f2ac5510d4 100644 --- a/src/rpc/virnettlscontext.c +++ b/src/rpc/virnettlscontext.c @@ -25,6 +25,9 @@ #include #include +#if HAVE_GNULTLS_CRYPTO_H +# include +#endif #include #include "gnutls_1_0_compat.h"