minor tweaks for ocaml 4.12

Both mldonkey and the 2.4x series of unison need the same minor tweak so they
can build on ocaml 4.12.

The unison change was ok bket@ (MAINTAINER)
This commit is contained in:
daniel 2021-12-04 01:31:33 +00:00
parent 780c9539dd
commit 68d09754c0
4 changed files with 39 additions and 4 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.37 2021/12/02 03:59:20 daniel Exp $
# $OpenBSD: Makefile,v 1.38 2021/12/04 01:31:33 daniel Exp $
COMMENT = e-donkey client
VER = 3.1.6
DISTNAME = mldonkey-${VER}
REVISION = 9
REVISION = 10
CATEGORIES = net
HOMEPAGE = http://mldonkey.sourceforge.net/Main_Page

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-src_networks_donkey_donkeyClient_ml,v 1.1 2021/12/04 01:31:33 daniel Exp $
ocaml 4.12 compat
Index: src/networks/donkey/donkeyClient.ml
--- src/networks/donkey/donkeyClient.ml.orig
+++ src/networks/donkey/donkeyClient.ml
@@ -818,8 +818,7 @@ another better way, since this functionnality is still
end
-external hash_param : int -> int -> 'a -> int = "caml_hash_univ_param" "noalloc"
-let hash x = hash_param 10 100 x
+let hash = Hashtbl.hash
let shared_of_file file =
match file.file_shared with

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.15 2021/12/02 03:59:20 daniel Exp $
# $OpenBSD: Makefile,v 1.16 2021/12/04 01:31:33 daniel Exp $
VER= 2.48.15
REV= v4
REVISION= 7
REVISION= 8
GH_TAGNAME= v${VER}${REV}
PKGNAME= unison-${VER}${REV:S/^v/pl/}

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-uutil_ml,v 1.1 2021/12/04 01:31:33 daniel Exp $
ocaml 4.12 compat
Index: uutil.ml
--- uutil.ml.orig
+++ uutil.ml
@@ -34,9 +34,7 @@ let myNameAndVersion = myName ^ " " ^ myVersion
let hash2 x y = (17 * x + 257 * y) land 0x3FFFFFFF
-external hash_param : int -> int -> 'a -> int = "caml_hash_univ_param" "noalloc"
-
-let hash x = hash_param 10 100 x
+let hash = Hashtbl.hash
(*****************************************************************************)
(* File sizes *)