diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-11-08 08:00:29 -0800 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-11-08 08:00:29 -0800 |
commit | 05d258667d12b2decda87024a59250c43343b509 (patch) | |
tree | e50127ceac0781f0b4f091adb70111e3a1a30a0f /src/libstore/globals.hh | |
parent | 2fde7e0108d70bcba64ebecc5e5c7ee2863e3446 (diff) |
Fix build on macOS
Diffstat (limited to 'src/libstore/globals.hh')
-rw-r--r-- | src/libstore/globals.hh | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index be741a830..88fe72202 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -46,7 +46,13 @@ struct PluginFilesSetting : public BaseSetting<Paths> void set(const std::string & str, bool append = false) override; }; -const uint32_t maxIdsPerBuild = 1 << 16; +const uint32_t maxIdsPerBuild = + #if __linux__ + 1 << 16 + #else + 1 + #endif + ; class Settings : public Config { @@ -277,16 +283,26 @@ public: multi-user settings with untrusted users. )"}; - #if __linux__ Setting<bool> autoAllocateUids{this, false, "auto-allocate-uids", "Whether to allocate UIDs for builders automatically."}; - Setting<uint32_t> startId{this, 872415232, "start-id", + Setting<uint32_t> startId{this, + #if __linux__ + 872415232, + #else + 56930, + #endif + "start-id", "The first UID and GID to use for dynamic ID allocation."}; - Setting<uint32_t> uidCount{this, maxIdsPerBuild * 128, "id-count", + Setting<uint32_t> uidCount{this, + #if __linux__ + maxIdsPerBuild * 128, + #else + 128, + #endif + "id-count", "The number of UIDs/GIDs to use for dynamic ID allocation."}; - #endif Setting<bool> impersonateLinux26{this, false, "impersonate-linux-26", "Whether to impersonate a Linux 2.6 machine on newer kernels.", |