fix freebsd compilation

This commit is contained in:
xackus 2020-11-02 23:18:55 +01:00
parent 7703f4c60a
commit 06b4526a3e

View File

@ -2998,7 +2998,7 @@ fn gimmeMoreOfThoseSweetSweetFileDescriptors() void {
}
while (true) {
lim.cur = min + (max - min) / 2;
lim.cur = min + @divTrunc(max - min, 2); // on freebsd rlim_t is signed
if (posix.setrlimit(.NOFILE, lim)) |_| {
min = lim.cur;
} else |_| {