diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-08-31 12:52:07 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-08-31 12:52:07 +0200 |
commit | 7d4a7136dba7ceb3d5b080b092eb76d23e2bb549 (patch) | |
tree | 43498144c2772de48a006a16a2837e03c52a5b1d /src | |
parent | fabde432dc046183b1eeaf9265effa47e89c3236 (diff) |
More macOS build fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/nix/run.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix/run.cc b/src/nix/run.cc index fcde540fc..f016b04a1 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); |