summaryrefslogtreecommitdiffstats
path: root/bin/ksh/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ksh/misc.c')
-rw-r--r--bin/ksh/misc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/ksh/misc.c b/bin/ksh/misc.c
index 3a5f19f0930..90da37d0426 100644
--- a/bin/ksh/misc.c
+++ b/bin/ksh/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.38 2013/11/28 10:33:37 sobrado Exp $ */
+/* $OpenBSD: misc.c,v 1.39 2015/01/16 06:39:32 deraadt Exp $ */
/*
* Miscellaneous functions
@@ -6,7 +6,6 @@
#include "sh.h"
#include <ctype.h>
-#include <sys/param.h> /* for MAXPATHLEN */
#include "charclass.h"
short ctypes [UCHAR_MAX+1]; /* type bits for unsigned char */
@@ -1120,7 +1119,7 @@ reset_nonblock(int fd)
}
-/* Like getcwd(), except bsize is ignored if buf is 0 (MAXPATHLEN is used) */
+/* Like getcwd(), except bsize is ignored if buf is 0 (PATH_MAX is used) */
char *
ksh_get_wd(char *buf, int bsize)
{
@@ -1131,8 +1130,8 @@ ksh_get_wd(char *buf, int bsize)
* inject possibly allocated space into the ATEMP area. */
/* Assume getcwd() available */
if (!buf) {
- bsize = MAXPATHLEN;
- b = alloc(MAXPATHLEN + 1, ATEMP);
+ bsize = PATH_MAX;
+ b = alloc(PATH_MAX + 1, ATEMP);
} else
b = buf;