summaryrefslogtreecommitdiffstats
path: root/df/main.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-03-25 19:35:43 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-03-25 19:35:43 +0100
commitf1d10672c7da94f8983b3b5d434e64b127da1242 (patch)
tree7784335b920dc08d950976ef7ff7647e4f763b9f /df/main.c
parent88b5ee9d952fa3268fab54abb9e62aa3fef42927 (diff)
downloadlibguestfs-f1d10672c7da94f8983b3b5d434e64b127da1242.tar.gz
libguestfs-f1d10672c7da94f8983b3b5d434e64b127da1242.tar.xz
libguestfs-f1d10672c7da94f8983b3b5d434e64b127da1242.zip
df: Avoid a compilation error if libxml2 is not available.
virt_df-domains.o: In function `add_domain': /home/feeliwood/Downloads/libguestfs-1.17.21/df/domains.c:274: undefined reference to `guestfs___for_each_disk' guestfs___for_each_disk is only available when libvirt _and_ libxml2 dependencies are available at compile time. Thanks Tho Huynh.
Diffstat (limited to 'df/main.c')
-rw-r--r--df/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/df/main.c b/df/main.c
index fecb3b38..1396e1cb 100644
--- a/df/main.c
+++ b/df/main.c
@@ -260,10 +260,10 @@ main (int argc, char *argv[])
* the full list of guests and drives, which we add in batches.
*/
if (drvs == NULL) {
-#ifdef HAVE_LIBVIRT
+#if defined(HAVE_LIBVIRT) && defined(HAVE_LIBXML2)
get_domains_from_libvirt ();
#else
- fprintf (stderr, _("%s: compiled without support for libvirt.\n"),
+ fprintf (stderr, _("%s: compiled without support for libvirt and/or libxml2.\n"),
program_name);
exit (EXIT_FAILURE);
#endif