Fix macOS build

This commit is contained in:
Eelco Dolstra 2022-11-21 11:45:41 +01:00
parent 653b32a78f
commit 82d5cf2a76

View file

@ -149,11 +149,15 @@ void LocalDerivationGoal::killChild()
void LocalDerivationGoal::killSandbox(bool getStats) void LocalDerivationGoal::killSandbox(bool getStats)
{ {
if (cgroup) { if (cgroup) {
#if __linux__
auto stats = destroyCgroup(*cgroup); auto stats = destroyCgroup(*cgroup);
if (getStats) { if (getStats) {
buildResult.cpuUser = stats.cpuUser; buildResult.cpuUser = stats.cpuUser;
buildResult.cpuSystem = stats.cpuSystem; buildResult.cpuSystem = stats.cpuSystem;
} }
#else
abort();
#endif
} }
else if (buildUser) { else if (buildUser) {