From: "Richard W.M. Jones" <rjones(a)redhat.com>
However since the OCaml bindings use guestfs_safe_strdup we need to
export that (in the private functions section) from guestfs.h.
---
generator/generator_c.ml | 2 ++
ocaml/guestfs_c.h | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/generator/generator_c.ml b/generator/generator_c.ml
index 4324ec0..daa5c5b 100644
--- a/generator/generator_c.ml
+++ b/generator/generator_c.ml
@@ -625,6 +625,8 @@ extern void *guestfs_next_private (guestfs_h *g, const char
**key_rtn);
extern void *guestfs_safe_malloc (guestfs_h *g, size_t nbytes);
extern void *guestfs_safe_calloc (guestfs_h *g, size_t n, size_t s);
extern const char *guestfs_tmpdir (void);
+extern char *guestfs_safe_strdup (guestfs_h *g, const char *str);
+extern void *guestfs_safe_memdup (guestfs_h *g, void *ptr, size_t size);
#ifdef GUESTFS_PRIVATE_FOR_EACH_DISK
extern int guestfs___for_each_disk (guestfs_h *g, virDomainPtr dom, int (*)(guestfs_h *g,
const char *filename, const char *format, int readonly, void *data), void *data);
#endif
diff --git a/ocaml/guestfs_c.h b/ocaml/guestfs_c.h
index a374bf2..2bcd577 100644
--- a/ocaml/guestfs_c.h
+++ b/ocaml/guestfs_c.h
@@ -19,8 +19,6 @@
#ifndef GUESTFS_OCAML_C_H
#define GUESTFS_OCAML_C_H
-#include "guestfs-internal.h"
-
#define Guestfs_val(v) (*((guestfs_h **)Data_custom_val(v)))
extern void ocaml_guestfs_raise_error (guestfs_h *g, const char *func)
Noreturn;
--
1.7.6