From ac2766807725ffa811e5c8e421377f2f693bc008 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Thu, 26 Feb 2026 11:20:14 +0100 Subject: [PATCH 1/2] Define PATH_MAX to 8192 if undefined --- src/frontend/ocamlmerlin/ocamlmerlin.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frontend/ocamlmerlin/ocamlmerlin.c b/src/frontend/ocamlmerlin/ocamlmerlin.c index 2046839902..81ecd159a6 100644 --- a/src/frontend/ocamlmerlin/ocamlmerlin.c +++ b/src/frontend/ocamlmerlin/ocamlmerlin.c @@ -132,6 +132,11 @@ static void failwith(const char *msg) exit(EXIT_FAILURE); } +#ifndef PATH_MAX +/* PATH_MAX is undefined on e.g. Hurd */ +#define PATH_MAX 8192 +#endif + #ifdef _WIN32 #define PATHSZ (MAX_PATH+1) #define SOCKSZ (MAX_PATH+1) From 8b435018c3d634fbe9397767fbe4c6a384f0a524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Mon, 16 Mar 2026 17:38:13 +0100 Subject: [PATCH 2/2] Add a changelog entry for #2039 --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 4b45fa5bf9..58847f9222 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,8 @@ unreleased - Fix bugs on signature help about labelled and optional parameters (#2032) - Add `-end-position` parameter for `enclosing` (#2029) - Signature help should appear even if the 'in' is not written (#2036) + + merlin binary + - Define PATH_MAX to 4096 if undefined (eg. hurd) (#2039) + tests - Add a reproduction case for #1214, the issue has been resolved before (#2022) - Add reproduction case for #1763 but it is not failing anymore (#2021)