From bc98de4d14f9c099e47a7de6efc3766823ca3f54 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 26 Mar 2020 13:01:58 +0000 Subject: [PATCH] util/test: Use MAX_PATH on Windows Windows provides MAX_PATH rather than PATH_MAX for the maximum allowable path length. This is not a limit on the length of filename which can exist on the filesystem, but a length on the length of path which can be passed to Win32 API calls. Signed-off-by: Daniel Stone Reviewed-by: Eric Engestrom Fixes: f8f1413070a ("util/u_process: add util_get_process_exec_path") Part-of: --- src/util/process_test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util/process_test.c b/src/util/process_test.c index 708c2766eb9..00703df6034 100644 --- a/src/util/process_test.c +++ b/src/util/process_test.c @@ -31,6 +31,11 @@ #include #include +#if DETECT_OS_WINDOWS && !defined(PATH_MAX) +#include +#define PATH_MAX MAX_PATH +#endif + bool error = false; static void -- 2.30.2