lwt-2.4.3-ocaml-4.01.patch 995 B

12345678910111213141516171819202122232425262728293031323334353637
  1. commit 0df80f6d05625f80e1e3e05a46e355728881b38a
  2. Author: Anil Madhavapeddy <anil@recoil.org>
  3. Date: Sat Aug 3 20:20:55 2013 +0100
  4. OCaml 4.01.0dev has a Unix.O_CLOEXEC flag, so add this to Lwt_unix too.
  5. This was added quite recently in ocaml/ocaml@2207c45056e69d1ea5
  6. diff --git a/src/unix/lwt_unix.ml b/src/unix/lwt_unix.ml
  7. index 5115ffe..4222f7b 100644
  8. --- a/src/unix/lwt_unix.ml
  9. +++ b/src/unix/lwt_unix.ml
  10. @@ -596,6 +596,9 @@ type open_flag =
  11. #if ocaml_version >= (3, 13)
  12. | O_SHARE_DELETE
  13. #endif
  14. +#if ocaml_version >= (4, 01)
  15. + | O_CLOEXEC
  16. +#endif
  17. #if windows
  18. diff --git a/src/unix/lwt_unix.mli b/src/unix/lwt_unix.mli
  19. index cc9df59..f85df52 100644
  20. --- a/src/unix/lwt_unix.mli
  21. +++ b/src/unix/lwt_unix.mli
  22. @@ -315,6 +315,9 @@ type open_flag =
  23. #if ocaml_version >= (3, 13)
  24. | O_SHARE_DELETE
  25. #endif
  26. +#if ocaml_version >= (4, 01)
  27. + | O_CLOEXEC
  28. +#endif
  29. val openfile : string -> open_flag list -> file_perm -> file_descr Lwt.t
  30. (** Wrapper for [Unix.openfile]. *)