mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-26 14:03:49 +03:00
build: avoid gcrypt deprecation warnings
When combining old gcc (4.2.1) and new gcrypt (1.5.2), such as when using the Ports repository on FreeBSD, the build fails with: CC libvirt_driver_la-libvirt.lo cc1: warnings being treated as errors In file included from libvirt.c:58: /usr/local/include/gcrypt.h:1336: warning: 'gcry_ac_io_mode_t' is deprecated [-Wdeprecated-declarations] Relevant part of gcrypt.h: 1333 typedef struct gcry_ac_io 1334 { 1335 /* This is an INTERNAL structure, do NOT use manually. */ 1336 gcry_ac_io_mode_t mode _GCRY_ATTR_INTERNAL; 1337 gcry_ac_io_type_t type _GCRY_ATTR_INTERNAL; 1338 union The sad part is that we aren't even using the deprecated symbols - their mere inclusion in the installed header is provoking the problems. It looks like newer gcc is a bit more tolerant (that is, this is a shortcoming of FreeBSD's use of an older compiler). Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
bd56d0d813
commit
bf87b99d72
@ -1090,6 +1090,10 @@ 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
|
||||
GNUTLS_CFLAGS="$GNUTLS_CFLAGS -DGCRYPT_NO_DEPRECATED"
|
||||
|
||||
with_gnutls=yes
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user