[Libguestfs] [PATCH 1/3] ocaml: Add Bytes.sub_string function to Bytes compat module.

Richard W.M. Jones rjones at redhat.com
Tue Apr 11 15:53:33 UTC 2017


This is only used when OCaml < 4.02 (eg. RHEL 7).  For more recent
versions the real Bytes.sub_string function is used instead.
---
 m4/guestfs_ocaml.m4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/m4/guestfs_ocaml.m4 b/m4/guestfs_ocaml.m4
index 0479e70ab..d8bd89f00 100644
--- a/m4/guestfs_ocaml.m4
+++ b/m4/guestfs_ocaml.m4
@@ -120,6 +120,7 @@ AS_IF([test "x$have_Bytes_module" = "xno"],[
 include String
 let of_string = String.copy
 let to_string = String.copy
+let sub_string = String.sub
 EOF
     ln -s ../generator/bytes.ml mllib/bytes.ml
     OCAML_GENERATOR_BYTES_COMPAT_CMO='$(top_builddir)/generator/bytes.cmo'
-- 
2.12.0




More information about the Libguestfs mailing list