summaryrefslogtreecommitdiff
path: root/bin/pax
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pax')
-rw-r--r--bin/pax/file_subs.c7
-rw-r--r--bin/pax/pax.h4
-rw-r--r--bin/pax/tables.c7
3 files changed, 8 insertions, 10 deletions
diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c
index 016c17a26f2..e37c085847a 100644
--- a/bin/pax/file_subs.c
+++ b/bin/pax/file_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file_subs.c,v 1.36 2014/07/14 05:58:19 guenther Exp $ */
+/* $OpenBSD: file_subs.c,v 1.37 2014/11/23 05:32:20 guenther Exp $ */
/* $NetBSD: file_subs.c,v 1.4 1995/03/21 09:07:18 cgd Exp $ */
/*-
@@ -34,13 +34,12 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/time.h>
#include <sys/stat.h>
-#include <sys/uio.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -343,7 +342,7 @@ node_creat(ARCHD *arcn)
int pass = 0;
mode_t file_mode;
struct stat sb;
- char target[MAXPATHLEN];
+ char target[PATH_MAX];
char *nm = arcn->name;
int len;
diff --git a/bin/pax/pax.h b/bin/pax/pax.h
index 290dc58730c..13b53283596 100644
--- a/bin/pax/pax.h
+++ b/bin/pax/pax.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pax.h,v 1.18 2014/01/30 13:30:11 espie Exp $ */
+/* $OpenBSD: pax.h,v 1.19 2014/11/23 05:32:20 guenther Exp $ */
/* $NetBSD: pax.h,v 1.3 1995/03/21 09:07:41 cgd Exp $ */
/*-
@@ -49,7 +49,7 @@
#define DEVBLK 8192 /* default read blksize for devices */
#define FILEBLK 10240 /* default read blksize for files */
#define PAXPATHLEN 3072 /* maximum path length for pax. MUST be */
- /* longer than the system MAXPATHLEN */
+ /* longer than the system PATH_MAX */
/*
* Pax modes of operation
diff --git a/bin/pax/tables.c b/bin/pax/tables.c
index 4730c309aa0..49eee25a5ed 100644
--- a/bin/pax/tables.c
+++ b/bin/pax/tables.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tables.c,v 1.36 2014/07/14 06:00:22 guenther Exp $ */
+/* $OpenBSD: tables.c,v 1.37 2014/11/23 05:32:20 guenther Exp $ */
/* $NetBSD: tables.c,v 1.4 1995/03/21 09:07:45 cgd Exp $ */
/*-
@@ -35,10 +35,9 @@
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/time.h>
#include <sys/stat.h>
-#include <sys/fcntl.h>
+#include <limits.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
@@ -1126,7 +1125,7 @@ add_dir(char *name, struct stat *psb, int frc_mode)
{
DIRDATA *dblk;
sigset_t allsigs, savedsigs;
- char realname[MAXPATHLEN], *rp;
+ char realname[PATH_MAX], *rp;
if (dirp == NULL)
return;