about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-02-18T22·05+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-02-19T09·19+0100
commit5ea138dc4b9822095723b75bc2962e3d899f5437 (patch)
tree72acb973599899a2463d6b249067b3acf9a8c0c5
parent79a3ba7fa3cd23b31ea43007899ed79f181d4faf (diff)
Enable chroot support on old glibc versions.
-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 d9a7f3109ad0..f583d6857e20 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