1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 01:39:36 +01:00

Fix more -Wundef, in darwin context

This commit is contained in:
Robert Hensing 2025-04-05 00:58:07 +02:00
parent 2b51250534
commit ba89da8fa2
17 changed files with 56 additions and 56 deletions

View file

@ -10,7 +10,7 @@
namespace nix {
#if __linux__
#ifdef __linux__
static std::vector<gid_t> get_group_list(const char *username, gid_t group_id)
{
@ -94,7 +94,7 @@ struct SimpleUserLock : UserLock
if (lock->uid == getuid() || lock->uid == geteuid())
throw Error("the Nix user should not be a member of '%s'", settings.buildUsersGroup);
#if __linux__
#ifdef __linux__
/* Get the list of supplementary groups of this user. This is
* usually either empty or contains a group such as "kvm". */
@ -193,7 +193,7 @@ std::unique_ptr<UserLock> acquireUserLock(uid_t nrIds, bool useUserNamespace)
bool useBuildUsers()
{
#if __linux__
#ifdef __linux__
static bool b = (settings.buildUsersGroup != "" || settings.autoAllocateUids) && isRootUser();
return b;
#elif __APPLE__