From 0d5c510523d6821a9fcb8c46e4e0f4a25ded71be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Mon, 16 Sep 2024 09:15:34 +0200 Subject: [PATCH] include multi-byte extern to work around https://github.com/ocaml/ocaml/issues/11449 --- src/unix/lwt_process_stubs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/unix/lwt_process_stubs.c b/src/unix/lwt_process_stubs.c index c7afd9111..7f72a4b65 100644 --- a/src/unix/lwt_process_stubs.c +++ b/src/unix/lwt_process_stubs.c @@ -13,7 +13,13 @@ caml_win32_multi_byte_to_wide_char, at least as of ocaml 5.0 */ #define CAML_INTERNALS #if OCAML_VERSION < 50000 -#define caml_win32_multi_byte_to_wide_char win_multi_byte_to_wide_char +/* 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