From df05f49dcd49dfeafe7fdb4d2d3517d886bf6df1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 6 Jan 2015 10:49:44 +0100 Subject: [PATCH] Fix building on Darwin Fixes #433. --- src/libstore/build.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index d65e56482..e73e4a4a3 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(readLine(builderOut.readSide), tmp)) abort(); pid = tmp; - } else { + } else +#endif + { ProcessOptions options; options.allowVfork = !buildUser.enabled(); pid = startProcess([&]() {