mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
meson: remove obsolete check for LO_FLAGS_AUTOCLEAR
The LO_FLAGS_AUTOCLEAR constant was introduced to Linux in commit 96c5865559cee0f9cbc5173f3c949f6ce3525581 Author: David Woodhouse <dwmw2@infradead.org> Date: Wed Feb 6 01:36:27 2008 -0800 Allow auto-destruction of loop devices This is old enough that all our supported platforms can be assumed to have this feature. For added fun this whole meson check was semantically insane because EPOLL_CLOEXEC is not a valid arg to unshare(). Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
9edbdb9781
commit
84eb50dbd0
@ -1532,12 +1532,11 @@ if not get_option('driver_lxc').disabled() and host_machine.system() == 'linux'
|
||||
#include <sys/epoll.h>
|
||||
|
||||
void main(void) {
|
||||
unshare(!(LO_FLAGS_AUTOCLEAR));
|
||||
unshare(1);
|
||||
}
|
||||
'''
|
||||
if cc.compiles(lxc_support_code, name: 'lxc support', args: '-D_GNU_SOURCE')
|
||||
conf.set('WITH_LXC', 1)
|
||||
conf.set('WITH_DECL_LO_FLAGS_AUTOCLEAR', 1)
|
||||
elif get_option('driver_lxc').enabled()
|
||||
error('Required kernel features for LXC were not found')
|
||||
endif
|
||||
|
@ -66,9 +66,7 @@
|
||||
# include <linux/magic.h>
|
||||
# endif
|
||||
# include <sys/statfs.h>
|
||||
# if WITH_DECL_LO_FLAGS_AUTOCLEAR
|
||||
# include <linux/loop.h>
|
||||
# endif
|
||||
# include <linux/loop.h>
|
||||
# include <sys/ioctl.h>
|
||||
# include <linux/cdrom.h>
|
||||
/* These come from linux/fs.h, but that header conflicts with
|
||||
@ -748,7 +746,7 @@ int virFileUpdatePerm(const char *path,
|
||||
}
|
||||
|
||||
|
||||
#if defined(__linux__) && WITH_DECL_LO_FLAGS_AUTOCLEAR
|
||||
#if defined(__linux__)
|
||||
|
||||
/* virFileLoopDeviceOpenLoopCtl() returns -1 when a real failure has occurred
|
||||
* while in the process of allocating or opening the loop device. On success
|
||||
|
Loading…
Reference in New Issue
Block a user