[Nix-dev] [PATCH 1/2] Enable chroot support on old glibc versions.

ludo at gnu.org ludo at gnu.org
Mon Feb 18 23:05:39 CET 2013


From: Ludovic Courtès <ludo at gnu.org>

---
 src/libstore/build.cc |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index d9a7f31..f583d68 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
-- 
1.7.10.4



More information about the nix-dev mailing list