summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/patch/util.c')
-rw-r--r--usr.bin/patch/util.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/patch/util.c b/usr.bin/patch/util.c
index 4db53a42b5b..ee6e5d12a9f 100644
--- a/usr.bin/patch/util.c
+++ b/usr.bin/patch/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.38 2014/12/13 10:31:07 tobias Exp $ */
+/* $OpenBSD: util.c,v 1.39 2015/01/16 06:40:10 deraadt Exp $ */
/*
* patch - a program to apply diffs to original files
@@ -26,7 +26,6 @@
* behaviour
*/
-#include <sys/param.h>
#include <sys/stat.h>
#include <ctype.h>
@@ -95,7 +94,7 @@ int
backup_file(const char *orig)
{
struct stat filestat;
- char bakname[MAXPATHLEN], *s, *simplename;
+ char bakname[PATH_MAX], *s, *simplename;
dev_t orig_device;
ino_t orig_inode;
@@ -396,7 +395,7 @@ fetchname(const char *at, bool *exists, int strip_leading)
char *
checked_in(char *file)
{
- char *filebase, *filedir, tmpbuf[MAXPATHLEN];
+ char *filebase, *filedir, tmpbuf[PATH_MAX];
struct stat filestat;
filebase = basename(file);