forked from lix-project/lix
* 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).
|
# Check for chroot support (requires chroot() and bind mounts).
|
||||||
AC_CHECK_FUNCS([chroot])
|
AC_CHECK_FUNCS([chroot])
|
||||||
|
AC_CHECK_FUNCS([unshare])
|
||||||
AC_CHECK_HEADERS([sched.h], [], [], [])
|
AC_CHECK_HEADERS([sched.h], [], [], [])
|
||||||
AC_CHECK_HEADERS([sys/param.h], [], [], [])
|
AC_CHECK_HEADERS([sys/param.h], [], [], [])
|
||||||
AC_CHECK_HEADERS([sys/mount.h], [], [],
|
AC_CHECK_HEADERS([sys/mount.h], [], [],
|
||||||
|
|
|
@ -34,13 +34,10 @@
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_SCHED_H
|
#if HAVE_SCHED_H
|
||||||
#if !defined _GNU_SOURCE
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#endif
|
#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 {
|
namespace nix {
|
||||||
|
|
Loading…
Reference in a new issue