Handle "unknown" ocaml system as Linux
authorStephane Glondu <steph@glondu.net>
Thu, 17 Aug 2023 12:27:20 +0000 (14:27 +0200)
committerStéphane Glondu <glondu@debian.org>
Tue, 20 Aug 2024 07:01:02 +0000 (09:01 +0200)
In Debian, on mipsel and mips64el, ocaml reports system as "unknown".

Gbp-Pq: Name 0001-Handle-unknown-ocaml-system-as-Linux.patch

clock/select/select.ml

index aea3237256418b48a88e7a62b5f833ede925ba05..7318e0a054f2e761ceb2e42af9b63559fc26874b 100644 (file)
@@ -22,12 +22,12 @@ let () =
       | [|_; "--system"; system; "-o"; output|] ->
           let system =
             match system with
-            | "linux" | "elf" -> `Linux
+            | "linux" | "elf" | "unknown" -> `Linux
             | "win32" | "win64" | "mingw64" | "mingw" | "cygwin" -> `Windows
             | "freebsd" -> `FreeBSD
             | "macosx" -> `MacOSX
             | "beos" | "dragonfly" | "bsd" | "openbsd" | "netbsd" | "gnu"
-            | "solaris" | "unknown" ->
+            | "solaris" ->
               invalid_arg "Unsupported system: %s" system
             | v ->
               if String.sub system 0 5 = "linux"