commit 06b4526a3e15d776437cdcf45d76ed34c6c39272 (tree) parent 7703f4c60a501c4f4bc74c7d814619aa818d601b Author: xackus <14938807+xackus@users.noreply.github.com> Date: Mon, 2 Nov 2020 23:18:55 +0100 fix freebsd compilation Diffstat:
| M | src/main.zig | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main.zig b/src/main.zig @@ -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 |_| {