From aa2165ef1fb8c458f7cad6050ba81aa38d2c9226 Mon Sep 17 00:00:00 2001 From: Benjamin Mourad Date: Fri, 2 Aug 2024 07:59:15 -0400 Subject: [PATCH] Ensure compatibility with `camlzip` versions before 1.12 (#1610) --- bap-byteweight.opam | 2 +- dune-project | 2 +- lib/bap_byteweight/bap_byteweight_signatures.ml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bap-byteweight.opam b/bap-byteweight.opam index f92fdb897..30eebb787 100644 --- a/bap-byteweight.opam +++ b/bap-byteweight.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-signatures" {= version} "bap-std" {= version} - "camlzip" {>= "1.12" & < "2.0"} + "camlzip" {>= "1.0" & < "2.0"} "core_kernel" {>= "v0.14" & < "v0.16"} "bap-common" {= version} "ppx_bap" {= version} diff --git a/dune-project b/dune-project index 440670ff0..a9132b891 100644 --- a/dune-project +++ b/dune-project @@ -283,7 +283,7 @@ (depends (bap-signatures (= :version)) (bap-std (= :version)) - (camlzip (and (>= 1.12) (< 2.0))) + (camlzip (and (>= 1.0) (< 2.0))) (core_kernel (and (>= v0.14) (< v0.16))) (bap-common (= :version)) (ppx_bap (= :version)) diff --git a/lib/bap_byteweight/bap_byteweight_signatures.ml b/lib/bap_byteweight/bap_byteweight_signatures.ml index 6d2ff0412..0ecc78596 100644 --- a/lib/bap_byteweight/bap_byteweight_signatures.ml +++ b/lib/bap_byteweight/bap_byteweight_signatures.ml @@ -109,7 +109,7 @@ let update_or_fail ?compiler target data payload path = let path = make_entry ?compiler target data in let data = Bytes.unsafe_to_string (data.save payload) in Zip.add_entry data zip path; - List.iter entries ~f:(fun ({Zip.filename; comment; mtime},data) -> + List.iter entries ~f:(fun ({Zip.filename; comment; mtime; _},data) -> Zip.add_entry data zip filename ~comment ~mtime) let copy input output =