summaryrefslogtreecommitdiff
path: root/pkgtools/mtree
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-09-06 21:08:08 +0000
committerjoerg <joerg@pkgsrc.org>2007-09-06 21:08:08 +0000
commit06fc16100295c8bc7bcb00712abca79ebdd5bedb (patch)
treef70f05c21689a96f99925045db82cb33d9f8b46d /pkgtools/mtree
parent4f84d697c284a321d3e004f7384da208ce00c36a (diff)
downloadpkgsrc-06fc16100295c8bc7bcb00712abca79ebdd5bedb.tar.gz
Fix build on QNX. From Sean Boudreau.
Diffstat (limited to 'pkgtools/mtree')
-rw-r--r--pkgtools/mtree/files/pack_dev.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgtools/mtree/files/pack_dev.c b/pkgtools/mtree/files/pack_dev.c
index 3a6407be3c2..7b746ae9f97 100644
--- a/pkgtools/mtree/files/pack_dev.c
+++ b/pkgtools/mtree/files/pack_dev.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pack_dev.c,v 1.2 2004/08/21 04:10:45 jlam Exp $ */
+/* $NetBSD: pack_dev.c,v 1.3 2007/09/06 21:08:08 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 04:10:45 jlam Exp $");
+__RCSID("$NetBSD: pack_dev.c,v 1.3 2007/09/06 21:08:08 joerg Exp $");
#endif /* not lint */
#if HAVE_SYS_TYPES_H
@@ -73,6 +73,9 @@ __RCSID("$NetBSD: pack_dev.c,v 1.2 2004/08/21 04:10:45 jlam Exp $");
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
+#ifdef __QNXNTO__
+#include <sys/netmgr.h>
+#endif
#include "pack_dev.h"
@@ -96,7 +99,11 @@ pack_native(int n, u_long numbers[], const char **error)
portdev_t dev = 0;
if (n == 2) {
+#ifdef __QNXNTO__
+ dev = makedev(ND_LOCAL_NODE, numbers[0], numbers[1]);
+#else
dev = makedev(numbers[0], numbers[1]);
+#endif
if (major(dev) != numbers[0])
*error = iMajorError;
else if (minor(dev) != numbers[1])