ocaml: Use Caml_state_opt in preference to caml_state

Link: https://discuss.ocaml.org/t/test-caml-state-and-conditionally-caml-acquire-runtime-system-good-or-bad/12489/7
Thanks: Guillaume Munch-Maccagnoni
This commit is contained in:
Richard W.M. Jones
2023-06-27 16:31:55 +01:00
parent 7d4e9c927e
commit cade0b1aeb

View File

@@ -412,7 +412,7 @@ event_callback_wrapper (guestfs_h *g,
* https://discuss.ocaml.org/t/test-caml-state-and-conditionally-caml-acquire-runtime-system-good-or-bad/12489
*/
#if OCAML_VERSION_MAJOR >= 5
bool acquired = caml_state != NULL;
bool acquired = Caml_state_opt != NULL;
#else
const bool acquired = false;
#endif