1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 12:21:48 +02:00

Fix signedness error on FreeBSD

https://hydra.nixos.org/build/295398446
This commit is contained in:
Eelco Dolstra 2025-04-23 17:41:35 +02:00
parent 876f676d90
commit fd0835e7d7

View file

@ -57,7 +57,7 @@ size_t savedStackSize = 0;
void setStackSize(size_t stackSize)
{
struct rlimit limit;
if (getrlimit(RLIMIT_STACK, &limit) == 0 && limit.rlim_cur < stackSize) {
if (getrlimit(RLIMIT_STACK, &limit) == 0 && static_cast<size_t>(limit.rlim_cur) < stackSize) {
savedStackSize = limit.rlim_cur;
limit.rlim_cur = std::min(static_cast<rlim_t>(stackSize), limit.rlim_max);
if (setrlimit(RLIMIT_STACK, &limit) != 0) {