FreeBSD build fix proposal. (#137)

rlim_t is signed in this platform.
This commit is contained in:
David CARLIER 2021-05-28 23:31:04 +01:00 committed by GitHub
parent 83bef6e85a
commit e61f80584e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,7 @@ impl ConfigTarget for Command {
return self;
}
let func = move || {
let memlimit: libc::rlim_t = memlimit << 20;
let memlimit: libc::rlim_t = (memlimit as libc::rlim_t) << 20;
let r = libc::rlimit {
rlim_cur: memlimit,
rlim_max: memlimit,