meson: drop check for unshare()

The unshare() syscall was introduced to Linux in

  commit 2da436e00f9a5fdd0fb6b31e4b2b2ba82e8f5ab8
  Author: JANAK DESAI <janak@us.ibm.com>
  Date:   Tue Feb 7 12:59:03 2006 -0800

    [PATCH] unshare system call -v5: system call registration for i386

This is old enough that all our supported platforms can be assumed
to have this feature. Furthermore, the virprocess.c file was already
using unshare() with nothing more than a #ifdef __linux__ check.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2022-12-08 09:17:37 +00:00
parent 84eb50dbd0
commit 3e3b012172

View File

@ -1526,20 +1526,7 @@ elif get_option('driver_libxl').enabled()
endif endif
if not get_option('driver_lxc').disabled() and host_machine.system() == 'linux' and conf.has('WITH_LIBVIRTD') if not get_option('driver_lxc').disabled() and host_machine.system() == 'linux' and conf.has('WITH_LIBVIRTD')
lxc_support_code = ''' conf.set('WITH_LXC', 1)
#include <sched.h>
#include <linux/loop.h>
#include <sys/epoll.h>
void main(void) {
unshare(1);
}
'''
if cc.compiles(lxc_support_code, name: 'lxc support', args: '-D_GNU_SOURCE')
conf.set('WITH_LXC', 1)
elif get_option('driver_lxc').enabled()
error('Required kernel features for LXC were not found')
endif
elif get_option('driver_lxc').enabled() elif get_option('driver_lxc').enabled()
error('linux and remote_driver are required for LXC') error('linux and remote_driver are required for LXC')
endif endif