summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-09-06 20:10:22 +0000
committerjoerg <joerg@pkgsrc.org>2007-09-06 20:10:22 +0000
commit70e41a92631000ed6b4b23a8eb542f35991a5fd8 (patch)
tree48fef19209a0e526aa09727221f29f2ebbdc8d86 /archivers
parent251295c87fa78b87db3871af5d3b18523b4c4d26 (diff)
downloadpkgsrc-70e41a92631000ed6b4b23a8eb542f35991a5fd8.tar.gz
Fix build on NetBSD. Add QNX support based on patch from Sean Boudreau.
Diffstat (limited to 'archivers')
-rw-r--r--archivers/pax/files/ar_io.c11
-rw-r--r--archivers/pax/files/pack_dev.c7
-rw-r--r--archivers/pax/files/pax.h9
3 files changed, 16 insertions, 11 deletions
diff --git a/archivers/pax/files/ar_io.c b/archivers/pax/files/ar_io.c
index 127ed2a1a10..98a1949a2a5 100644
--- a/archivers/pax/files/ar_io.c
+++ b/archivers/pax/files/ar_io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ar_io.c,v 1.10 2007/03/08 17:18:18 rillig Exp $ */
+/* $NetBSD: ar_io.c,v 1.11 2007/09/06 20:10:22 joerg Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -48,7 +48,7 @@
#if 0
static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: ar_io.c,v 1.10 2007/03/08 17:18:18 rillig Exp $");
+__RCSID("$NetBSD: ar_io.c,v 1.11 2007/09/06 20:10:22 joerg Exp $");
#endif
#endif /* not lint */
@@ -67,12 +67,11 @@ __RCSID("$NetBSD: ar_io.c,v 1.10 2007/03/08 17:18:18 rillig Exp $");
#if HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
-#if HAVE_SYS_TAPE_H
-#include <sys/tape.h>
-#include "tape_h_fixup.h"
-#endif
#if HAVE_SYS_MTIO_H
#include <sys/mtio.h>
+#elif HAVE_SYS_TAPE_H
+#include <sys/tape.h>
+#include "tape_h_fixup.h"
#endif
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
diff --git a/archivers/pax/files/pack_dev.c b/archivers/pax/files/pack_dev.c
index 2473a4ccce4..c63ae3b4b0b 100644
--- a/archivers/pax/files/pack_dev.c
+++ b/archivers/pax/files/pack_dev.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pack_dev.c,v 1.2 2004/08/21 03:28:56 jlam Exp $ */
+/* $NetBSD: pack_dev.c,v 1.3 2007/09/06 20:10:22 joerg Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
#include <sys/cdefs.h>
#endif
#if !defined(lint)
-__RCSID("$NetBSD: pack_dev.c,v 1.2 2004/08/21 03:28:56 jlam Exp $");
+__RCSID("$NetBSD: pack_dev.c,v 1.3 2007/09/06 20:10:22 joerg Exp $");
#endif /* not lint */
#if HAVE_SYS_TYPES_H
@@ -75,6 +75,7 @@ __RCSID("$NetBSD: pack_dev.c,v 1.2 2004/08/21 03:28:56 jlam Exp $");
#endif
#include "pack_dev.h"
+#include "pax.h"
static pack_t pack_netbsd;
static pack_t pack_freebsd;
@@ -96,7 +97,7 @@ pack_native(int n, u_long numbers[], const char **error)
portdev_t dev = 0;
if (n == 2) {
- dev = makedev(numbers[0], numbers[1]);
+ dev = TODEV(numbers[0], numbers[1]);
if (major(dev) != numbers[0])
*error = iMajorError;
else if (minor(dev) != numbers[1])
diff --git a/archivers/pax/files/pax.h b/archivers/pax/files/pax.h
index 9bf5dd1ae0d..474e828bd5d 100644
--- a/archivers/pax/files/pax.h
+++ b/archivers/pax/files/pax.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pax.h,v 1.10 2006/09/03 12:13:13 obache Exp $ */
+/* $NetBSD: pax.h,v 1.11 2007/09/06 20:10:22 joerg Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -253,7 +253,12 @@ typedef struct oplist {
#else
# define MAJOR(x) major(x)
# define MINOR(x) minor(x)
-# define TODEV(x, y) makedev((x), (y))
+# ifdef __QNXNTO__
+# include <sys/netmgr.h>
+# define TODEV(x, y) makedev(ND_LOCAL_NODE, (x), (y))
+# else
+# define TODEV(x, y) makedev((x), (y))
+# endif
#endif
/*