forked from lix-project/lix
More macOS build fixes
This commit is contained in:
parent
fabde432dc
commit
7d4a7136db
|
@ -16,6 +16,8 @@ using namespace nix;
|
||||||
|
|
||||||
std::string chrootHelperName = "__run_in_chroot";
|
std::string chrootHelperName = "__run_in_chroot";
|
||||||
|
|
||||||
|
extern char * * environ;
|
||||||
|
|
||||||
struct CmdRun : InstallablesCommand
|
struct CmdRun : InstallablesCommand
|
||||||
{
|
{
|
||||||
Strings command = { "bash" };
|
Strings command = { "bash" };
|
||||||
|
@ -85,7 +87,7 @@ struct CmdRun : InstallablesCommand
|
||||||
if (s) kept[var] = s;
|
if (s) kept[var] = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
clearenv();
|
environ = nullptr;
|
||||||
|
|
||||||
for (auto & var : kept)
|
for (auto & var : kept)
|
||||||
setenv(var.first.c_str(), var.second.c_str(), 1);
|
setenv(var.first.c_str(), var.second.c_str(), 1);
|
||||||
|
|
Loading…
Reference in a new issue