From 7d4a7136dba7ceb3d5b080b092eb76d23e2bb549 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 31 Aug 2017 12:52:07 +0200 Subject: [PATCH] More macOS build fixes --- src/nix/run.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);