From df6e4074c09bdc4e6da079bf9f0a03dffd42b482 Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Mon, 20 Apr 2015 22:15:18 +0000 Subject: [PATCH] patch(1): small include changes. Mostly to match OpenBSD, no functional change. Obtained from: OpenBSD --- usr.bin/patch/inp.c | 2 +- usr.bin/patch/pch.c | 1 + usr.bin/patch/util.c | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c index f0dcd45a19ba..826f85b40e9b 100644 --- a/usr.bin/patch/inp.c +++ b/usr.bin/patch/inp.c @@ -34,8 +34,8 @@ #include #include -#include #include +#include #include #include #include diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c index aacafc8ad6d0..e731ca1f9e8f 100644 --- a/usr.bin/patch/pch.c +++ b/usr.bin/patch/pch.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/usr.bin/patch/util.c b/usr.bin/patch/util.c index 27ee1aebb816..1859e17e25ef 100644 --- a/usr.bin/patch/util.c +++ b/usr.bin/patch/util.c @@ -27,13 +27,13 @@ * $FreeBSD$ */ -#include #include #include #include #include #include +#include #include #include #include @@ -96,7 +96,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; @@ -406,7 +406,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);