Fix build with OCaml 5.x
authorStephane Glondu <glondu@debian.org>
Tue, 18 Jun 2024 04:13:52 +0000 (06:13 +0200)
committerHilko Bengen <bengen@debian.org>
Fri, 16 Aug 2024 00:39:35 +0000 (02:39 +0200)
Gbp-Pq: Name 0003-Fix-build-with-OCaml-5.x.patch

src/mode_build.ml
src/utils.ml

index ff7733e4b1fc461e86aa93e6102f49c99d347baf..0edf9e54a6a1bd3963061a9c2e00b4ddda3b0429 100644 (file)
@@ -123,7 +123,7 @@ let rec build debug
       (PackageSet.cardinal packages);
     if debug >= 2 then (
       List.iter (printf "  - %s\n") pretty_packages;
-      flush Pervasives.stdout
+      flush Stdlib.stdout
     )
   );
 
@@ -207,7 +207,7 @@ let rec build debug
       (List.length files);
     if debug >= 2 then (
       List.iter (fun { ft_path = path } -> printf "  - %s\n" path) files;
-      flush Pervasives.stdout
+      flush Stdlib.stdout
     )
   );
 
index f5990ef8de8fc695949e12f1de128618206098ed..5b0aeb7de7340f8076b6b281a2cd1edd0f98b26e 100644 (file)
@@ -40,7 +40,7 @@ let dir_exists name =
   try (stat name).st_kind = S_DIR
   with Unix_error _ -> false
 
-let uniq ?(cmp = Pervasives.compare) xs =
+let uniq ?(cmp = Stdlib.compare) xs =
   let rec loop acc = function
     | [] -> acc
     | [x] -> x :: acc
@@ -51,7 +51,7 @@ let uniq ?(cmp = Pervasives.compare) xs =
   in
   List.rev (loop [] xs)
 
-let sort_uniq ?(cmp = Pervasives.compare) xs =
+let sort_uniq ?(cmp = Stdlib.compare) xs =
   let xs = List.sort cmp xs in
   let xs = uniq ~cmp xs in
   xs