diff --git a/lwt-safe-strings.patch b/lwt-safe-strings.patch new file mode 100644 index 0000000..8eddb50 --- /dev/null +++ b/lwt-safe-strings.patch @@ -0,0 +1,14 @@ +diff -ur lwt-2.5.0.old/src/ssl/lwt_ssl.mli lwt-2.5.0/src/ssl/lwt_ssl.mli +--- lwt-2.5.0.old/src/ssl/lwt_ssl.mli 2015-07-03 13:39:30.000000000 +0100 ++++ lwt-2.5.0/src/ssl/lwt_ssl.mli 2017-11-17 16:07:20.829197330 +0000 +@@ -56,8 +56,8 @@ + val ssl_accept_handshake : uninitialized_socket -> socket Lwt.t + (** Await a SSL/TLS handshake on the specified socket (used by servers). *) + +-val read : socket -> string -> int -> int -> int Lwt.t +-val write : socket -> string -> int -> int -> int Lwt.t ++val read : socket -> bytes -> int -> int -> int Lwt.t ++val write : socket -> bytes -> int -> int -> int Lwt.t + + val read_bytes : socket -> Lwt_bytes.t -> int -> int -> int Lwt.t + val write_bytes : socket -> Lwt_bytes.t -> int -> int -> int Lwt.t diff --git a/ocaml-lwt.spec b/ocaml-lwt.spec index 788ba12..5d6fd59 100644 --- a/ocaml-lwt.spec +++ b/ocaml-lwt.spec @@ -21,6 +21,9 @@ Source0: https://github.com/ocsigen/lwt/archive/2.5.0/lwt-2.5.0.tar.gz # Change some deprecated functions for OCaml 4.5.0. Patch1: lwt-2.5.0-ocaml45.patch +# Safe strings for OCaml 4.06. +Patch2: lwt-safe-strings.patch + BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-ocamlbuild BuildRequires: ocaml-findlib-devel @@ -50,8 +53,7 @@ developing applications that use %{name}. %prep %setup -q -n lwt-%{version} - -%patch1 -p1 +%autopatch -p1 %build