=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/which/which.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- src/usr.bin/which/which.c 2014/05/20 01:25:23 1.19 +++ src/usr.bin/which/which.c 2015/01/16 06:40:14 1.20 @@ -1,4 +1,4 @@ -/* $OpenBSD: which.c,v 1.19 2014/05/20 01:25:23 guenther Exp $ */ +/* $OpenBSD: which.c,v 1.20 2015/01/16 06:40:14 deraadt Exp $ */ /* * Copyright (c) 1997 Todd C. Miller @@ -16,7 +16,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include #define PROG_WHICH 1 #define PROG_WHEREIS 2 @@ -94,7 +94,7 @@ int findprog(char *prog, char *path, int progmode, int allmatches) { - char *p, filename[MAXPATHLEN]; + char *p, filename[PATH_MAX]; int proglen, plen, rval = 0; struct stat sbuf; char *pathcpy;