diff --git a/src/libutil/current-process.cc b/src/libutil/current-process.cc index 926714ae803..4cc5a4218be 100644 --- a/src/libutil/current-process.cc +++ b/src/libutil/current-process.cc @@ -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(limit.rlim_cur) < stackSize) { savedStackSize = limit.rlim_cur; limit.rlim_cur = std::min(static_cast(stackSize), limit.rlim_max); if (setrlimit(RLIMIT_STACK, &limit) != 0) {