pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/pax/files Fix build on NetBSD. Add QNX suppo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0d775b7411b8
branches:  trunk
changeset: 533000:0d775b7411b8
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Sep 06 20:10:22 2007 +0000

description:
Fix build on NetBSD. Add QNX support based on patch from Sean Boudreau.

diffstat:

 archivers/pax/files/ar_io.c    |  11 +++++------
 archivers/pax/files/pack_dev.c |   7 ++++---
 archivers/pax/files/pax.h      |   9 +++++++--
 3 files changed, 16 insertions(+), 11 deletions(-)

diffs (93 lines):

diff -r a96407326df1 -r 0d775b7411b8 archivers/pax/files/ar_io.c
--- a/archivers/pax/files/ar_io.c       Thu Sep 06 19:56:16 2007 +0000
+++ b/archivers/pax/files/ar_io.c       Thu Sep 06 20:10:22 2007 +0000
@@ -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,13 +67,12 @@
 #if HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
-#if HAVE_SYS_TAPE_H
+#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_MTIO_H
-#include <sys/mtio.h>
-#endif
 #if HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
diff -r a96407326df1 -r 0d775b7411b8 archivers/pax/files/pack_dev.c
--- a/archivers/pax/files/pack_dev.c    Thu Sep 06 19:56:16 2007 +0000
+++ b/archivers/pax/files/pack_dev.c    Thu Sep 06 20:10:22 2007 +0000
@@ -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 @@
 #endif
 
 #include "pack_dev.h"
+#include "pax.h"
 
 static pack_t  pack_netbsd;
 static pack_t  pack_freebsd;
@@ -96,7 +97,7 @@
        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 -r a96407326df1 -r 0d775b7411b8 archivers/pax/files/pax.h
--- a/archivers/pax/files/pax.h Thu Sep 06 19:56:16 2007 +0000
+++ b/archivers/pax/files/pax.h Thu Sep 06 20:10:22 2007 +0000
@@ -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 @@
 #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
 
 /*



Home | Main Index | Thread Index | Old Index