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>
#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
# 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
}
-#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