summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-06-16 03:27:00 +0000
committerMike Frysinger <vapier@gentoo.org>2006-06-16 03:27:00 +0000
commit6855667fefbd913f8d8c6a6c993eb3e011b38059 (patch)
tree745dd758eb795cee23194d66cc13ff0a615a8a8d /libc
parent93e49144b45ca5703059c37bd31f2b2028ebbd93 (diff)
sync change from glibc for larger path max
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/common/getcwd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/getcwd.c b/libc/sysdeps/linux/common/getcwd.c
index a9042c76b..165ea317e 100644
--- a/libc/sysdeps/linux/common/getcwd.c
+++ b/libc/sysdeps/linux/common/getcwd.c
@@ -12,9 +12,11 @@
#include <dirent.h>
#include <string.h>
#include <unistd.h>
+#include <sys/param.h>
#include <sys/syscall.h>
libc_hidden_proto(getcwd)
+libc_hidden_proto(getpagesize)
libc_hidden_proto(strcat)
libc_hidden_proto(strcpy)
@@ -182,7 +184,7 @@ char *getcwd(char *buf, size_t size)
__set_errno(EINVAL);
return NULL;
}
- alloc_size = PATH_MAX;
+ alloc_size = MAX (PATH_MAX, getpagesize ());
}
path=buf;
if (buf == NULL) {