mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
Merge pull request #12937 from roberth/undefined-macros
Fix undefined macro errors
This commit is contained in:
commit
a56aaf26c2
3 changed files with 3 additions and 3 deletions
|
@ -209,7 +209,7 @@ StringSet Settings::getDefaultExtraPlatforms()
|
||||||
StringSet levels = computeLevels();
|
StringSet levels = computeLevels();
|
||||||
for (auto iter = levels.begin(); iter != levels.end(); ++iter)
|
for (auto iter = levels.begin(); iter != levels.end(); ++iter)
|
||||||
extraPlatforms.insert(*iter + "-linux");
|
extraPlatforms.insert(*iter + "-linux");
|
||||||
#elif __APPLE__
|
#elif defined(__APPLE__)
|
||||||
// Rosetta 2 emulation layer can run x86_64 binaries on aarch64
|
// Rosetta 2 emulation layer can run x86_64 binaries on aarch64
|
||||||
// machines. Note that we can’t force processes from executing
|
// machines. Note that we can’t force processes from executing
|
||||||
// x86_64 in aarch64 environments or vice versa since they can
|
// x86_64 in aarch64 environments or vice versa since they can
|
||||||
|
|
|
@ -196,7 +196,7 @@ bool useBuildUsers()
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
static bool b = (settings.buildUsersGroup != "" || settings.autoAllocateUids) && isRootUser();
|
static bool b = (settings.buildUsersGroup != "" || settings.autoAllocateUids) && isRootUser();
|
||||||
return b;
|
return b;
|
||||||
#elif __APPLE__
|
#elif defined(__APPLE__)
|
||||||
static bool b = settings.buildUsersGroup != "" && isRootUser();
|
static bool b = settings.buildUsersGroup != "" && isRootUser();
|
||||||
return b;
|
return b;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -108,7 +108,7 @@ std::optional<Path> getSelfExe()
|
||||||
{
|
{
|
||||||
#if defined(__linux__) || defined(__GNU__)
|
#if defined(__linux__) || defined(__GNU__)
|
||||||
return readLink("/proc/self/exe");
|
return readLink("/proc/self/exe");
|
||||||
#elif __APPLE__
|
#elif defined(__APPLE__)
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
uint32_t size = sizeof(buf);
|
uint32_t size = sizeof(buf);
|
||||||
if (_NSGetExecutablePath(buf, &size) == 0)
|
if (_NSGetExecutablePath(buf, &size) == 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue