diff options
author | Eric Blake <eblake@redhat.com> | 2012-08-21 10:26:18 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2012-08-21 12:07:00 -0600 |
commit | 77de1f3573c30911fbe6b9b180f027a429116a85 (patch) | |
tree | 5731fadca861ea63f876eca8c0261af0c05077b2 /src/util | |
parent | command: avoid double close in virExecWithHook (diff) | |
download | libvirt-77de1f3573c30911fbe6b9b180f027a429116a85.tar.gz libvirt-77de1f3573c30911fbe6b9b180f027a429116a85.tar.bz2 libvirt-77de1f3573c30911fbe6b9b180f027a429116a85.zip |
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 4c18acf, 2dee896); 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.
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/virfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/virfile.c b/src/util/virfile.c index 6a4386974..dd64e88a0 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -497,7 +497,7 @@ int virFileUpdatePerm(const char *path, } -#ifdef __linux__ +#if defined(__linux__) && HAVE_DECL_LO_FLAGS_AUTOCLEAR static int virFileLoopDeviceOpen(char **dev_name) { int fd = -1; |