]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: fix build without gnutls installed
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 9 Apr 2016 19:04:40 +0000 (22:04 +0300)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 9 Apr 2016 19:04:40 +0000 (22:04 +0300)
Move including of gnutls/gnutls.h in qemu/qemu_domain.c under the
"ifdef WITH_GNUTLS" check because otherwise it fails like this:

  CC       qemu/libvirt_driver_qemu_impl_la-qemu_domain.lo
qemu/qemu_domain.c:50:10: fatal error: 'gnutls/gnutls.h' file not found

in case if gnutls is not installed on the system.

src/qemu/qemu_domain.c

index 30dee4df744b6e6ba63694e29784c7deab14871d..223154d8208ad9d4ac3b1bb327e5c8810be42cf5 100644 (file)
 #include "virprocess.h"
 #include "virrandom.h"
 #include "base64.h"
-#include <gnutls/gnutls.h>
-#if HAVE_GNUTLS_CRYPTO_H
-# include <gnutls/crypto.h>
+#ifdef WITH_GNUTLS
+# include <gnutls/gnutls.h>
+# if HAVE_GNUTLS_CRYPTO_H
+#  include <gnutls/crypto.h>
+# endif
 #endif
 #include "logging/log_manager.h"
 #include "locking/domain_lock.h"