···11+## v0.4 (2025-09-17)
22+33+* Clamp max open files to 2^19, as macOS sometimes returns
44+ 2^32-1 (#7 @avsm).
55+16## v0.3 (2023-03-10)
2738* Round timeouts up, not down in Poll.poll (spotted by @talex5)
···611712## v0.2 (2023-02-27)
81399-* Narrowed the type of Util.fd_of_unix (@reynir)
1010-* Use older school uerror instead of caml_uerror (@reynir)
1111-* Added c_standard to dune build flags (@reynir)
1414+* Narrowed the type of `Util.fd_of_unix` (@reynir)
1515+* Use older school uerror instead of `caml_uerror` (@reynir)
1616+* Added `c_standard` to dune build flags (@reynir)
1217* Addded ppoll(2) discoverability and a mini compat layer (@haesbaert)
1318* Improved tests (@haesbaert)
1419* Re-added macos support (@haesbaert)
+8-2
vendor/opam/iomux/lib/iomux_stubs.c
···150150 * Util
151151 */
152152153153-value /* noalloc */
153153+value
154154caml_iomux_poll_max_open_files(value v_unit)
155155{
156156- return (Val_int(sysconf(_SC_OPEN_MAX)));
156156+ CAMLparam1(v_unit);
157157+ long r = sysconf(_SC_OPEN_MAX);
158158+ if (r == -1) /* this allocs */
159159+ uerror("poll_max_open_files", Nothing);
160160+ else if (r > 524288)
161161+ r = 524288;
162162+ CAMLreturn (Val_int(r));
157163}
+1-1
vendor/opam/iomux/lib/util.ml
···11module Raw = struct
22- external max_open_files : unit -> int = "caml_iomux_poll_max_open_files" [@@noalloc]
22+ external max_open_files : unit -> int = "caml_iomux_poll_max_open_files"
33end
4455let max_open_files = Raw.max_open_files