aboutsummaryrefslogtreecommitdiff
path: root/lib/objFile.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-04-26 14:25:22 +0200
committerPierre-Marie Pédrot2020-04-26 14:59:35 +0200
commit0520fa60a855b4c5f7b9d9298607cfd9e346c0e3 (patch)
treec336819dc0d6253a29f450e28f95d09f5e43a24b /lib/objFile.ml
parente16aab42641f0b79827c4598bf065b1607a08c43 (diff)
Open object files in binary mode.
Diffstat (limited to 'lib/objFile.ml')
-rw-r--r--lib/objFile.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/objFile.ml b/lib/objFile.ml
index 190b1833bd..96db51a010 100644
--- a/lib/objFile.ml
+++ b/lib/objFile.ml
@@ -143,7 +143,7 @@ let marshal_out_segment h ~segment v =
let pos' = LargeFile.pos_out ch in
let len = Int64.sub pos' pos in
let hash =
- let in_ch = open_in h.out_filename in
+ let in_ch = open_in_bin h.out_filename in
let () = LargeFile.seek_in in_ch pos in
let digest = Digest.channel in_ch (Int64.to_int len) in
let () = close_in in_ch in
@@ -163,7 +163,7 @@ let marshal_out_binary h ~segment =
let pos' = LargeFile.pos_out ch in
let len = Int64.sub pos' pos in
let hash =
- let in_ch = open_in h.out_filename in
+ let in_ch = open_in_bin h.out_filename in
let () = LargeFile.seek_in in_ch pos in
let digest = Digest.channel in_ch (Int64.to_int len) in
let () = close_in in_ch in