[PATCH] vircapstest: fix build without LXC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When building without lxc support enabled, build fails with:

CLD     vircapstest
vircapstest.o: In function `test_virCapsDomainDataLookupLXC':
vircapstest.c:(.text+0x9ef): undefined reference to `testLXCCapsInit'

Fix that by hiding LXC tests under appropriate #ifdef.
---
 tests/vircapstest.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/vircapstest.c b/tests/vircapstest.c
index 3e5038b..b2c321e 100644
--- a/tests/vircapstest.c
+++ b/tests/vircapstest.c
@@ -289,6 +289,7 @@ test_virCapsDomainDataLookupXen(const void *data ATTRIBUTE_UNUSED)
     return ret;
 }
 
+#ifdef WITH_LXC
 static int
 test_virCapsDomainDataLookupLXC(const void *data ATTRIBUTE_UNUSED)
 {
@@ -311,6 +312,7 @@ test_virCapsDomainDataLookupLXC(const void *data ATTRIBUTE_UNUSED)
     virObjectUnref(caps);
     return ret;
 }
+#endif /* WITH_LXC */
 
 static int
 mymain(void)
@@ -326,9 +328,11 @@ mymain(void)
     if (virtTestRun("virCapsDomainDataLookupXen",
                     test_virCapsDomainDataLookupXen, NULL) < 0)
         ret = -1;
+#ifdef WITH_LXC
     if (virtTestRun("virCapsDomainDataLookupLXC",
                     test_virCapsDomainDataLookupLXC, NULL) < 0)
         ret = -1;
+#endif /* WITH_LXC */
 
     return ret;
 }
-- 
2.3.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]