From 65fcc48804a9af9e8e03c6449a4406622890b5e6 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 3 Jun 2025 07:38:33 +0200 Subject: [PATCH] common BUGFIX define PATH_MAX if not available PATH_MAX is optional in POSIX, and thus may not be provided (e.g. on GNU/Hurd). Provide a fallback definition for it, so the existing code keeps working for now; include to ensure that PATH_MAX is available if provided on the current OS/libc. --- src/ly_common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ly_common.h b/src/ly_common.h index 2ba9686b6..95c904654 100644 --- a/src/ly_common.h +++ b/src/ly_common.h @@ -16,6 +16,7 @@ #ifndef LY_COMMON_H_ #define LY_COMMON_H_ +#include #include #include #include @@ -61,6 +62,11 @@ struct lysc_node; #define GETMACRO6(_1, _2, _3, _4, _5, _6, NAME, ...) NAME #define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME +/** optional in POSIX */ +#ifndef PATH_MAX +# define PATH_MAX 4096 +#endif + /****************************************************************************** * Logger *****************************************************************************/