From e7ea3358ef627675fbd4669516617688a7e3dd94 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 20 Oct 2019 02:48:54 +0000 Subject: Don't rely on the existence of PATH_MAX --- src/libstddjb/sarealpath.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libstddjb/sarealpath.c b/src/libstddjb/sarealpath.c index 28631c6..0e316b2 100644 --- a/src/libstddjb/sarealpath.c +++ b/src/libstddjb/sarealpath.c @@ -1,7 +1,6 @@ /* ISC license. */ #include -#include #include #include #include @@ -10,7 +9,7 @@ int sarealpath (stralloc *sa, char const *path) { if (sa->s) { - if (!stralloc_readyplus(sa, PATH_MAX)) return -1 ; + if (!stralloc_readyplus(sa, 128)) return -1 ; if (!realpath(path, sa->s + sa->len)) return -1 ; sa->len += strlen(sa->s + sa->len) ; } -- cgit v1.2.3