Enable chroot support on old glibc versions.

This commit is contained in:
Ludovic Courtès 2013-02-18 23:05:39 +01:00 committed by Eelco Dolstra
parent 79a3ba7fa3
commit 5ea138dc4b
1 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,12 @@
#include <sched.h>
#endif
/* In GNU libc 2.11, <sys/mount.h> does not define `MS_PRIVATE', but
<linux/fs.h> does. */
#if !defined MS_PRIVATE && defined HAVE_LINUX_FS_H
#include <linux/fs.h>
#endif
#define CHROOT_ENABLED HAVE_CHROOT && HAVE_UNSHARE && HAVE_SYS_MOUNT_H && defined(MS_BIND) && defined(MS_PRIVATE) && defined(CLONE_NEWNS)
#if CHROOT_ENABLED