diff --git a/lwt-ocaml-405.patch b/lwt-ocaml-405.patch new file mode 100644 index 0000000..22172fb --- /dev/null +++ b/lwt-ocaml-405.patch @@ -0,0 +1,26 @@ +diff -ur lwt-75b1dc1aefae75dc4ac6455f5a2688b3a52adabd.old/src/unix/lwt_unix.ml lwt-75b1dc1aefae75dc4ac6455f5a2688b3a52adabd/src/unix/lwt_unix.ml +--- lwt-75b1dc1aefae75dc4ac6455f5a2688b3a52adabd.old/src/unix/lwt_unix.ml 2014-04-21 13:52:40.000000000 +0100 ++++ lwt-75b1dc1aefae75dc4ac6455f5a2688b3a52adabd/src/unix/lwt_unix.ml 2018-04-17 17:55:18.937430592 +0100 +@@ -599,6 +599,9 @@ + #if ocaml_version >= (4, 01) + | O_CLOEXEC + #endif ++#if ocaml_version >= (4, 05) ++ | O_KEEPEXEC ++#endif + + #if windows + +diff -ur lwt-75b1dc1aefae75dc4ac6455f5a2688b3a52adabd.old/src/unix/lwt_unix.mli lwt-75b1dc1aefae75dc4ac6455f5a2688b3a52adabd/src/unix/lwt_unix.mli +--- lwt-75b1dc1aefae75dc4ac6455f5a2688b3a52adabd.old/src/unix/lwt_unix.mli 2014-04-21 13:52:40.000000000 +0100 ++++ lwt-75b1dc1aefae75dc4ac6455f5a2688b3a52adabd/src/unix/lwt_unix.mli 2018-04-17 17:54:44.463413635 +0100 +@@ -318,6 +318,9 @@ + #if ocaml_version >= (4, 01) + | O_CLOEXEC + #endif ++#if ocaml_version >= (4, 05) ++ | O_KEEPEXEC ++#endif + + val openfile : string -> open_flag list -> file_perm -> file_descr Lwt.t + (** Wrapper for [Unix.openfile]. *) diff --git a/ocaml-lwt.spec b/ocaml-lwt.spec index 8baf35c..65febc4 100644 --- a/ocaml-lwt.spec +++ b/ocaml-lwt.spec @@ -11,6 +11,8 @@ License: LGPLv2+ with exceptions URL: http://ocsigen.org/lwt Source0: https://github.com/ocsigen/lwt/archive/%{commit}/lwt-%{commit}.tar.gz +# Patch to make this old LWT work with OCaml 4.05. +Patch1: lwt-ocaml-405.patch BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-ocamlbuild @@ -44,6 +46,7 @@ developing applications that use %{name}. %prep %setup -q -n lwt-%{commit} +%patch1 -p1 mv README README.old iconv -f iso-8859-1 -t utf-8 < README.old > README