mirror of
https://github.com/NixOS/nix
synced 2025-07-05 16:31:47 +02:00
Fix signedness error on FreeBSD
https://hydra.nixos.org/build/295398446
This commit is contained in:
parent
876f676d90
commit
fd0835e7d7
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue