From b8a722f9324598f802020ebd4985ce5c7d230f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Mon, 16 Sep 2024 11:52:16 +0200 Subject: [PATCH] copy extern definition to work around upstream issue --- src/unix/lwt_process_stubs.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/unix/lwt_process_stubs.c b/src/unix/lwt_process_stubs.c index c7afd9111..fea5e032b 100644 --- a/src/unix/lwt_process_stubs.c +++ b/src/unix/lwt_process_stubs.c @@ -15,6 +15,15 @@ #if OCAML_VERSION < 50000 #define caml_win32_multi_byte_to_wide_char win_multi_byte_to_wide_char #endif +#if OCAML_VERSION = 52000 +/* see https://github.com/ocsigen/lwt/pull/967#issuecomment-2273495094 + * TL;DR: some OCaml upstream issue means this extern is not included on the + * windows, it's added explicitly here instead. */ +CAMLextern int caml_win32_multi_byte_to_wide_char(const char* s, + int slen, + wchar_t *out, + int outlen); +#endif #include #include