Commit 06b4526a3e

xackus <14938807+xackus@users.noreply.github.com>
2020-11-02 23:18:55
fix freebsd compilation
1 parent 7703f4c
Changed files (1)
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 |_| {