about summary refs log tree commit diff
path: root/src/usr.bin/lndir
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-01-28 14:31:09 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2015-01-28 14:31:09 +0100
commitc9c371ec3ea85f25cfa5d31144689940d1f769a7 (patch)
tree2aaf464de6ec0b7125af26271ba8b25d6e13fa5d /src/usr.bin/lndir
parentcaa03bd0b43a89dcc93397182dc969417f09ba7c (diff)
downloadoutils-c9c371ec3ea85f25cfa5d31144689940d1f769a7.tar.gz
outils-c9c371ec3ea85f25cfa5d31144689940d1f769a7.tar.xz
outils-c9c371ec3ea85f25cfa5d31144689940d1f769a7.zip
cvs update
Diffstat (limited to 'src/usr.bin/lndir')
-rw-r--r--src/usr.bin/lndir/lndir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usr.bin/lndir/lndir.c b/src/usr.bin/lndir/lndir.c
index bdc5e78..42ed8e0 100644
--- a/src/usr.bin/lndir/lndir.c
+++ b/src/usr.bin/lndir/lndir.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: lndir.c,v 1.20 2014/05/20 01:25:23 guenther Exp $	*/
+/*	$OpenBSD: lndir.c,v 1.21 2015/01/16 06:40:09 deraadt Exp $	*/
 /* $XConsortium: lndir.c /main/15 1995/08/30 10:56:18 gildea $ */
 
 /*
@@ -47,7 +47,6 @@ in this Software without prior written authorization from the X Consortium.
 	%  lndir ../X
 */
 
-#include <sys/param.h>
 #include <sys/stat.h>
 
 #include <dirent.h>
@@ -58,6 +57,7 @@ in this Software without prior written authorization from the X Consortium.
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <limits.h>
 
 extern char *__progname;
 
@@ -179,8 +179,8 @@ addexcept(char *name)
 int
 dodir(char *fn, struct stat *fs, struct stat *ts, int rel)
 {
-	char buf[MAXPATHLEN + 1], symbuf[MAXPATHLEN + 1];
-	char basesym[MAXPATHLEN + 1];
+	char buf[PATH_MAX + 1], symbuf[PATH_MAX + 1];
+	char basesym[PATH_MAX + 1];
 	int n_dirs, symlen, basesymlen = -1;
 	struct stat sb, sc;
 	struct except *cur;