From 1ddb7a2352c9272c64ee65dfe80c5d57d95d8266 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Sun, 19 Apr 2026 07:20:00 +0200 Subject: [PATCH] Provide replacement value for PATH_MAX on platforms without it. The buffer length is used in a static array returned from Extra_FileNameGenericAppend(), used many places in the code, and a more dynamic approach would require a huge refactoring. There is no guarantee that the 4096 value picked is large enough, but it matches common values found on Linux. --- src/misc/extra/extraUtilFile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/misc/extra/extraUtilFile.c b/src/misc/extra/extraUtilFile.c index 6585b7a72..480280f3c 100644 --- a/src/misc/extra/extraUtilFile.c +++ b/src/misc/extra/extraUtilFile.c @@ -23,6 +23,9 @@ #define PATH_MAX MAX_PATH #else #include +# ifndef PATH_MAX +# define PATH_MAX 4096 +# endif #endif #include "extra.h"