diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-10-20 02:48:54 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-10-20 02:48:54 +0000 |
commit | e7ea3358ef627675fbd4669516617688a7e3dd94 (patch) | |
tree | fab75f03c494aec97afba1f529d7d8dbc37d76d0 /src/libstddjb | |
parent | a58c4b6b92c9036a25173c4e63d5235e1f9dcdae (diff) | |
download | skalibs-e7ea3358ef627675fbd4669516617688a7e3dd94.tar.xz |
Don't rely on the existence of PATH_MAX
Diffstat (limited to 'src/libstddjb')
-rw-r--r-- | src/libstddjb/sarealpath.c | 3 |
1 files changed, 1 insertions, 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 <string.h> -#include <limits.h> #include <stdlib.h> #include <skalibs/stralloc.h> #include <skalibs/djbunix.h> @@ -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) ; } |