[libvirt] [PATCH] build: avoid RHEL 5 build failure on LXC

Eric Blake eblake at redhat.com
Wed Oct 26 16:20:21 UTC 2011


Per the discussion here, LXC on RHEL 5 makes no sense.
https://www.redhat.com/archives/libvir-list/2011-September/msg01169.html

* configure.ac (with_lxc): Reject RHEL 5.x LXC as too old.
---

Pushing under the build-breaker rule.  I tested that this has no
impact on RHEL 6 or Fedora 14, but that on RHEL 5 it properly skips
building the entire lxc driver, letting the build get further (it
still died, but on a html file creation error rather than
compilation-related).

 configure.ac |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6a0936a..5753c08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -687,8 +687,9 @@ fi
 if test "$with_lxc" = "yes" || test "$with_lxc" = "check"; then
     AC_TRY_LINK([
         #include <sched.h>
+        #include <linux/loop.h>
     ], [
-        unshare (1);
+        unshare (!LO_FLAGS_AUTOCLEAR);
     ], [
         with_lxc=yes
     ], [
-- 
1.7.4.4




More information about the libvir-list mailing list