about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-12-12T13·41+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-12-12T13·41+0000
commit2b70a8e7c98adebdac1e546e17ee1d909b4e5989 (patch)
tree31c8433c046a205719d462e3d40641914a7a1ac8 /src
parent9122dcecbba9d5268d1087918ffe5a3b970625b8 (diff)
* Detect whether unshare() is available.
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index d4c5b81d3f50..8d06a66f6094 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -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 {