From: Mark Wielaard Date: Thu, 26 Mar 2026 12:32:18 +0000 (+0100) Subject: debuginfod: Make sure PATH_MAX exists in debuginfod-client.c X-Git-Tag: elfutils-0.195~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d13e0dba6dc77020bfb35a8fd1641428458f1a65;p=thirdparty%2Felfutils.git debuginfod: Make sure PATH_MAX exists in debuginfod-client.c Some systems (Hurd) don't define PATH_MAX (which is optional according to POSIX). Make sure it is defined and no special linux specific headers are used in debuginfod-client.c. * debuginfod/debuginfod-client.c: Include limits.h instead of linux/limits. If PATH_MAX isn't define it to 4K (the default on GNU/Linux). https://sourceware.org/bugzilla/show_bug.cgi?id=34016 Signed-off-by: Mark Wielaard --- diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c index 659d6f91..fb9ad82f 100644 --- a/debuginfod/debuginfod-client.c +++ b/debuginfod/debuginfod-client.c @@ -99,7 +99,7 @@ void debuginfod_end (debuginfod_client *c) { } #include #include #include -#include +#include #include #include #include @@ -110,6 +110,10 @@ void debuginfod_end (debuginfod_client *c) { } #include #include +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + /* If fts.h is included before config.h, its indirect inclusions may not give us the right LFS aliases of these functions, so map them manually. */ #ifdef BAD_FTS