* Detect whether unshare() is available.

This commit is contained in:
Eelco Dolstra 2008-12-12 13:41:36 +00:00
parent 9122dcecbb
commit 2b70a8e7c9
2 changed files with 2 additions and 4 deletions

View file

@ -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], [], [],

View file

@ -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 {