]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
build: skip lxc with too-old glibc
authorEric Blake <eblake@redhat.com>
Thu, 19 Jan 2012 20:35:39 +0000 (13:35 -0700)
committerEric Blake <eblake@redhat.com>
Mon, 23 Jan 2012 13:50:28 +0000 (06:50 -0700)
Since we already require the kernel to be new enough to support
LO_FLAGS_AUTOCLEAR, we might as well also require glibc to be
new enough to support epoll_create1().

* configure.ac (with_lxc): We require glibc 2.9 for LXC.
Reported and tested by Philipp Hahn.

configure.ac

index 729ba9b29e904680c878aa59b21be301cb1fa23d..6709ebf18284c86106148a2010a7fb58b184fd53 100644 (file)
@@ -734,16 +734,17 @@ if test "$with_lxc" = "yes" || test "$with_lxc" = "check"; then
     AC_TRY_LINK([
         #include <sched.h>
         #include <linux/loop.h>
+        #include <sys/epoll.h>
     ], [
-        unshare (!LO_FLAGS_AUTOCLEAR);
+        unshare (!(LO_FLAGS_AUTOCLEAR + EPOLL_CLOEXEC));
     ], [
         with_lxc=yes
     ], [
         if test "$with_lxc" = "check"; then
             with_lxc=no
-            AC_MSG_NOTICE([Function unshare() not present in <sched.h> header but required for LXC driver, disabling it])
+            AC_MSG_NOTICE([Required kernel features were not found, disabling LXC])
         else
-            AC_MSG_ERROR([Function unshare() not present in <sched.h> header, but required for LXC driver])
+            AC_MSG_ERROR([Required kernel features for LXC were not found])
         fi
     ])
 fi