More macOS build fixes

This commit is contained in:
Eelco Dolstra 2017-08-31 12:52:07 +02:00
parent fabde432dc
commit 7d4a7136db
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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);