m4/guestfs-ocaml.m4: Check for caml_unix_error

In OCaml 5.0, unix_error was renamed caml_unix_error.

If it's not available, define as unix_error, the old symbol name.
This commit is contained in:
Richard W.M. Jones
2026-03-17 16:05:45 +00:00
parent 3bff5a6f79
commit 48607d9d15
3 changed files with 22 additions and 1 deletions

View File

@@ -164,4 +164,9 @@ extern int accept4 (int sockfd, struct sockaddr *__restrict__ addr,
extern int pipe2 (int pipefd[2], int flags);
#endif
#ifndef HAVE_CAML_UNIX_ERROR
/* For backwards compatibility with OCaml < 5.0 */
#define caml_unix_error unix_error
#endif
#endif /* GUESTFS_INTERNAL_ALL_H_ */