(* Create a temporary directory. It is *not* deleted on exit. *)
let make_tmpdir () =
let chan = open_in "/dev/urandom" in
- let data = String.create 16 in
- really_input chan data 0 (String.length data);
+ let data = Bytes.create 16 in
+ really_input chan data 0 (Bytes.length data);
close_in chan;
+ let data = Bytes.to_string data in
let data = Digest.to_hex (Digest.string data) in
let dir = Filename.temp_dir_name // sprintf "goaljobstmp%s" data in
mkdir dir 0o700;