The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #7 from avsm/fix-sysconf-on-macos

clamp max open files to 2^19 to fix recent macOS POSIX divergence

authored by

Anil Madhavapeddy and committed by
GitHub
ee7eed65 c9e9eced

+20 -9
+3 -3
vendor/opam/iomux/.github/workflows/test.yml
··· 9 9 strategy: 10 10 fail-fast: false 11 11 matrix: 12 - ocaml-version: ["5.0.0", "4.14.1", "4.13.1", "4.12.1", "4.11.2", "4.10.2", "4.09.1", "4.08.1"] 12 + ocaml-version: ["5.3.0", "4.14.2"] 13 13 operating-system: [macos-latest, ubuntu-latest] 14 14 15 15 runs-on: ${{ matrix.operating-system }} 16 16 17 17 steps: 18 18 - name: Checkout code 19 - uses: actions/checkout@v2 19 + uses: actions/checkout@v5 20 20 21 21 - name: Use OCaml ${{ matrix.ocaml-version }} 22 - uses: ocaml/setup-ocaml@v2 22 + uses: ocaml/setup-ocaml@v3 23 23 with: 24 24 ocaml-compiler: ${{ matrix.ocaml-version }} 25 25
+8 -3
vendor/opam/iomux/CHANGES.md
··· 1 + ## v0.4 (2025-09-17) 2 + 3 + * Clamp max open files to 2^19, as macOS sometimes returns 4 + 2^32-1 (#7 @avsm). 5 + 1 6 ## v0.3 (2023-03-10) 2 7 3 8 * Round timeouts up, not down in Poll.poll (spotted by @talex5) ··· 6 11 7 12 ## v0.2 (2023-02-27) 8 13 9 - * Narrowed the type of Util.fd_of_unix (@reynir) 10 - * Use older school uerror instead of caml_uerror (@reynir) 11 - * Added c_standard to dune build flags (@reynir) 14 + * Narrowed the type of `Util.fd_of_unix` (@reynir) 15 + * Use older school uerror instead of `caml_uerror` (@reynir) 16 + * Added `c_standard` to dune build flags (@reynir) 12 17 * Addded ppoll(2) discoverability and a mini compat layer (@haesbaert) 13 18 * Improved tests (@haesbaert) 14 19 * Re-added macos support (@haesbaert)
+8 -2
vendor/opam/iomux/lib/iomux_stubs.c
··· 150 150 * Util 151 151 */ 152 152 153 - value /* noalloc */ 153 + value 154 154 caml_iomux_poll_max_open_files(value v_unit) 155 155 { 156 - return (Val_int(sysconf(_SC_OPEN_MAX))); 156 + CAMLparam1(v_unit); 157 + long r = sysconf(_SC_OPEN_MAX); 158 + if (r == -1) /* this allocs */ 159 + uerror("poll_max_open_files", Nothing); 160 + else if (r > 524288) 161 + r = 524288; 162 + CAMLreturn (Val_int(r)); 157 163 }
+1 -1
vendor/opam/iomux/lib/util.ml
··· 1 1 module Raw = struct 2 - external max_open_files : unit -> int = "caml_iomux_poll_max_open_files" [@@noalloc] 2 + external max_open_files : unit -> int = "caml_iomux_poll_max_open_files" 3 3 end 4 4 5 5 let max_open_files = Raw.max_open_files