1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 14:02:42 +01:00

Narrower scope for nativeSystem

I don't think we need a CPP defininition and a header entry, and this
way allows constant expression elimination.
This commit is contained in:
John Ericson 2023-11-05 12:17:33 -05:00
parent 8e222fbb12
commit 2678b51b31
3 changed files with 2 additions and 8 deletions

View file

@ -1620,6 +1620,8 @@ void setupSeccomp()
seccomp_release(ctx);
});
constexpr std::string_view nativeSystem = SYSTEM;
if (nativeSystem == "x86_64-linux" &&
seccomp_arch_add(ctx, SCMP_ARCH_X86) != 0)
throw SysError("unable to add 32-bit seccomp architecture");