about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-08-31T10·52+0200
committerEelco Dolstra <edolstra@gmail.com>2017-08-31T10·52+0200
commit7d4a7136dba7ceb3d5b080b092eb76d23e2bb549 (patch)
tree43498144c2772de48a006a16a2837e03c52a5b1d
parentfabde432dc046183b1eeaf9265effa47e89c3236 (diff)
More macOS build fixes
-rw-r--r--src/nix/run.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix/run.cc b/src/nix/run.cc
index fcde540fc2d2..f016b04a1ec8 100644
--- a/src/nix/run.cc
+++ b/src/nix/run.cc
@@ -16,6 +16,8 @@ using namespace nix;
 
 std::string chrootHelperName = "__run_in_chroot";
 
+extern char * * environ;
+
 struct CmdRun : InstallablesCommand
 {
     Strings command = { "bash" };
@@ -85,7 +87,7 @@ struct CmdRun : InstallablesCommand
                 if (s) kept[var] = s;
             }
 
-            clearenv();
+            environ = nullptr;
 
             for (auto & var : kept)
                 setenv(var.first.c_str(), var.second.c_str(), 1);