about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-01-06T09·49+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-01-06T09·49+0100
commitdf05f49dcd49dfeafe7fdb4d2d3517d886bf6df1 (patch)
tree0a0863a1d4b1e91211777d5bdeb38116b5971614
parent1b167c964fd0edec62b63a3aac71bcca84b6de38 (diff)
Fix building on Darwin
Fixes #433.
-rw-r--r--src/libstore/build.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index d65e56482d77..e73e4a4a33cb 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1909,6 +1909,7 @@ void DerivationGoal::startBuilder()
     builderOut.create();
 
     /* Fork a child to build the package. */
+#if CHROOT_ENABLED
     if (useChroot) {
         /* Set up private namespaces for the build:
 
@@ -1954,7 +1955,9 @@ void DerivationGoal::startBuilder()
         pid_t tmp;
         if (!string2Int<pid_t>(readLine(builderOut.readSide), tmp)) abort();
         pid = tmp;
-    } else {
+    } else
+#endif
+    {
         ProcessOptions options;
         options.allowVfork = !buildUser.enabled();
         pid = startProcess([&]() {