mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 16:23:02 +00:00
* Detect whether unshare() is available.
This commit is contained in:
parent
9122dcecbb
commit
2b70a8e7c9
@ -90,6 +90,7 @@ AC_LANG_POP(C++)
|
||||
|
||||
# Check for chroot support (requires chroot() and bind mounts).
|
||||
AC_CHECK_FUNCS([chroot])
|
||||
AC_CHECK_FUNCS([unshare])
|
||||
AC_CHECK_HEADERS([sched.h], [], [], [])
|
||||
AC_CHECK_HEADERS([sys/param.h], [], [], [])
|
||||
AC_CHECK_HEADERS([sys/mount.h], [], [],
|
||||
|
@ -34,13 +34,10 @@
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
#if HAVE_SCHED_H
|
||||
#if !defined _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <sched.h>
|
||||
#endif
|
||||
|
||||
#define CHROOT_ENABLED HAVE_CHROOT && HAVE_SYS_MOUNT_H && defined(MS_BIND) && defined(CLONE_NEWNS)
|
||||
#define CHROOT_ENABLED HAVE_CHROOT && HAVE_UNSHARE && HAVE_SYS_MOUNT_H && defined(MS_BIND) && defined(CLONE_NEWNS)
|
||||
|
||||
|
||||
namespace nix {
|
||||
|
Loading…
Reference in New Issue
Block a user