]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: work with older RHEL 5 kernel
authorEric Blake <eblake@redhat.com>
Tue, 21 Aug 2012 16:26:18 +0000 (10:26 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 21 Aug 2012 18:07:00 +0000 (12:07 -0600)
commit77de1f3573c30911fbe6b9b180f027a429116a85
tree5731fadca861ea63f876eca8c0261af0c05077b2
parent8211c677a36609c8d861f23ef21ec2c2e5645ece
build: work with older RHEL 5 kernel

We already skip out on building the LXC under RHEL 5, because the
kernel is too old (commits 4c18acf2dee896); but commit 9612e4b
moved some LXC-only code into common files, resulting in this
build failure:

util/virfile.c: In function 'virFileLoopDeviceAssociate':
util/virfile.c:580: error: 'LO_FLAGS_AUTOCLEAR' undeclared (first use in this function)

Unfortunately, the kernel folks only made it an enum, rather than
also a #define, so we have to modify configure.ac to record when
it is usable.

* configure.ac (with_lxc): Mark when LO_FLAGS_AUTOCLEAR was found.
* src/util/virfile.c (virFileLoopDeviceAssociate): Avoid
compilation when kernel is too old.
configure.ac
src/util/virfile.c