aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-02-18 23:05:39 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-02-19 10:19:11 +0100
commit5ea138dc4b9822095723b75bc2962e3d899f5437 (patch)
tree72acb973599899a2463d6b249067b3acf9a8c0c5 /src/libstore
parent79a3ba7fa3cd23b31ea43007899ed79f181d4faf (diff)
Enable chroot support on old glibc versions.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index d9a7f3109..f583d6857 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -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