diff --git a/cstruct-unix.opam b/cstruct-unix.opam index 3c7ef14e..f87503de 100644 --- a/cstruct-unix.opam +++ b/cstruct-unix.opam @@ -18,7 +18,6 @@ depends: [ "ocaml" {>= "4.06.0"} "dune" {>= "2.0.0"} "base-unix" - "mmap" {>= "1.2.0"} "cstruct" {=version} ] synopsis: "Access C-like structures directly from OCaml" diff --git a/unix/dune b/unix/dune index 256d51fc..9031788a 100644 --- a/unix/dune +++ b/unix/dune @@ -2,4 +2,4 @@ (name cstruct_unix) (wrapped false) (public_name cstruct-unix) - (libraries cstruct mmap unix)) + (libraries cstruct unix)) diff --git a/unix/unix_cstruct.ml b/unix/unix_cstruct.ml index 7039172a..5ac69851 100644 --- a/unix/unix_cstruct.ml +++ b/unix/unix_cstruct.ml @@ -15,5 +15,5 @@ *) let of_fd fd = - let buffer = Bigarray.(array1_of_genarray (Mmap.V1.map_file fd char c_layout false [|-1|])) in + let buffer = Bigarray.(array1_of_genarray (Unix.map_file fd char c_layout false [|-1|])) in Cstruct.of_bigarray buffer