Fix "Bad system call" running i686-linux binaries on x86_64-linux
To determine which seccomp filters to install, we were incorrectly using settings.thisSystem, which doesn't denote the actual system when --system is used. Fixes #2791.
This commit is contained in:
@@ -38,6 +38,9 @@ extern char * * environ;
|
||||
namespace nix {
|
||||
|
||||
|
||||
const std::string nativeSystem = SYSTEM;
|
||||
|
||||
|
||||
BaseError & BaseError::addPrefix(const FormatOrString & fs)
|
||||
{
|
||||
prefix_ = fs.s + prefix_;
|
||||
|
||||
@@ -30,6 +30,10 @@ struct Sink;
|
||||
struct Source;
|
||||
|
||||
|
||||
/* The system for which Nix is compiled. */
|
||||
extern const std::string nativeSystem;
|
||||
|
||||
|
||||
/* Return an environment variable. */
|
||||
string getEnv(const string & key, const string & def = "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user