]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: drop check for unshare()
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 8 Dec 2022 09:17:37 +0000 (09:17 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 12 Dec 2022 10:35:29 +0000 (10:35 +0000)
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>
meson.build

index 212c3cfafb5ff5832e488645cab60ccae5d2f9bd..0a09e510c76bed1ba5ccbd1bba47f3dd0dbdef93 100644 (file)
@@ -1526,20 +1526,7 @@ elif get_option('driver_libxl').enabled()
 endif
 
 if not get_option('driver_lxc').disabled() and host_machine.system() == 'linux' and conf.has('WITH_LIBVIRTD')
-  lxc_support_code = '''
-#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
+  conf.set('WITH_LXC', 1)
 elif get_option('driver_lxc').enabled()
   error('linux and remote_driver are required for LXC')
 endif