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

This commit is contained in:
joerg 2007-09-06 20:10:22 +00:00
parent 251295c87f
commit 70e41a9263
3 changed files with 16 additions and 11 deletions

View file

@ -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>

View file

@ -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])

View file

@ -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
/*