Fix compilation failure on OSX. (#3309)

This commit is contained in:
clemahieu 2021-05-27 14:35:22 +01:00 committed by GitHub
commit aec8d805ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@ void nano::set_file_descriptor_limit (std::size_t limit)
return;
}
fd_limit.rlim_cur = std::min (limit, fd_limit.rlim_max);
fd_limit.rlim_cur = std::min (static_cast<rlim_t> (limit), fd_limit.rlim_max);
if (-1 == setrlimit (RLIMIT_NOFILE, &fd_limit))
{
std::cerr << "Unable to set limits for the number of open file descriptors: " << std::strerror (errno);