summaryrefslogtreecommitdiff
path: root/net/wminet
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-03-23 17:31:05 +0000
committerjoerg <joerg@pkgsrc.org>2006-03-23 17:31:05 +0000
commit51e34d3913610e0a2059f84bf19b04092bb7cab4 (patch)
tree7fe0a84a49f290cf628d6f9a5e28cf2c734704d6 /net/wminet
parentd9a5a2254c8577f298cd95fc874874597e87977e (diff)
downloadpkgsrc-51e34d3913610e0a2059f84bf19b04092bb7cab4.tar.gz
Attempt at DragonFly support.
Diffstat (limited to 'net/wminet')
-rw-r--r--net/wminet/distinfo4
-rw-r--r--net/wminet/patches/patch-ab47
2 files changed, 31 insertions, 20 deletions
diff --git a/net/wminet/distinfo b/net/wminet/distinfo
index 67d5c73635d..aa2ad9c4094 100644
--- a/net/wminet/distinfo
+++ b/net/wminet/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.4 2005/02/24 12:14:07 agc Exp $
+$NetBSD: distinfo,v 1.5 2006/03/23 17:31:05 joerg Exp $
SHA1 (wmnet-1.2.tar.gz) = 9d7cad6d1ba90d2141665da155c880fae9f70614
RMD160 (wmnet-1.2.tar.gz) = 73e9b98487e43669e76651b7134f45c1af689e4a
Size (wmnet-1.2.tar.gz) = 19647 bytes
SHA1 (patch-aa) = d879f82d87ea42ae97726cddbfc5c9ec5ff4acd3
-SHA1 (patch-ab) = c0a69670629837745da3f93c038bad2b94a1c54f
+SHA1 (patch-ab) = 5b0cf1f48d7f21a29445519cfa6169bcf28933f8
diff --git a/net/wminet/patches/patch-ab b/net/wminet/patches/patch-ab
index ff344d0032d..16714b3669a 100644
--- a/net/wminet/patches/patch-ab
+++ b/net/wminet/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $
+$NetBSD: patch-ab,v 1.2 2006/03/23 17:31:06 joerg Exp $
---- if.c.orig Mon Oct 12 04:13:16 1998
-+++ if.c Sat Feb 24 19:48:53 2001
-@@ -12,6 +12,7 @@
+--- if.c.orig 1998-10-12 02:13:16.000000000 +0000
++++ if.c
+@@ -12,12 +12,13 @@
#include <unistd.h>
#include <limits.h>
#include <err.h>
@@ -10,11 +10,18 @@ $NetBSD: patch-ab,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $
#include <sys/param.h>
#include <sys/types.h>
#include <sys/ioctl.h>
-@@ -89,7 +90,11 @@
+ #include <sys/socket.h>
+ #include <net/if.h>
+-#if (__FreeBSD_version >= 300003)
++#if defined(__DragonFly__) || (defined(__FreeBSD_version) && __FreeBSD_version >= 300003)
+ #include <net/if_var.h>
+ #include <net/if_types.h>
+ #endif
+@@ -89,7 +90,11 @@ static int addIfData(unsigned long theAd
if (!newData) {
size -= IF_STEP;
fprintf(stderr, "wmnet: Warning -- low memory; "
-+#ifdef __NetBSD__
++#if defined(__NetBSD__) || defined(__DragonFly__)
+ "ignoring %s interface\n", theData->if_xname);
+#else
"ignoring %s interface\n", theData->if_name);
@@ -22,11 +29,11 @@ $NetBSD: patch-ab,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $
return 0;
}
-@@ -118,8 +123,12 @@
+@@ -118,8 +123,12 @@ static int addIfData(unsigned long theAd
ptr->flags = 0;
#ifndef NDEBUG
-+#ifdef __NetBSD__
++#if defined(__NetBSD__) || defined(__DragonFly__)
+ printf("Added '%.*s' to list.\n", IFNAMSIZ, theData->if_xname);
+#else
printf("Added '%.*s%d' to list.\n", IFNAMSIZ, theData->if_name,
@@ -35,15 +42,15 @@ $NetBSD: patch-ab,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $
#endif
// Bump the total.
-@@ -161,6 +170,7 @@
+@@ -161,6 +170,7 @@ static struct ifnet const* dereference(u
return &d;
else if (sizeof(d) == kvm_read(kd, a, &d, sizeof(d))) {
-+#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__DragonFly__)
/* We've read the structure's data, but the 'name' field still
points to kernel memory. We transfer the name to a local
buffer, and then modify the pointer to point to our
-@@ -178,6 +188,7 @@
+@@ -178,22 +188,32 @@ static struct ifnet const* dereference(u
to look at. While debugging, set these to NULL to trap
any attempts. */
@@ -51,7 +58,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $
d.if_softc = 0;
#if (__FreeBSD_version >= 300003)
d.if_addrhead.tqh_first = 0;
-@@ -185,15 +196,24 @@
+ #else
d.if_addrlist = 0;
#endif
d.if_bpf = 0;
@@ -64,7 +71,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $
#endif
c = a;
return &d;
-+#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__DragonFly__)
} else
return 0;
+#endif /* !NetBSD */
@@ -76,7 +83,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $
}
/*------------------------------------------------------------------------------
-@@ -233,6 +253,9 @@
+@@ -233,6 +253,9 @@ int ifInit(void)
{ "" }
};
@@ -86,8 +93,12 @@ $NetBSD: patch-ab,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $
/* Try to pull the address for the global kernel variable,
ifnet. This variable is the root of the singly-linked list
of network interfaces. */
-@@ -251,8 +274,12 @@
- #if (__FreeBSD_version >= 300003)
+@@ -248,11 +271,15 @@ int ifInit(void)
+
+ while (current) {
+ addIfData(current);
+-#if (__FreeBSD_version >= 300003)
++#if defined(__DragonFly__) || (defined(__FreeBSD_version) && __FreeBSD_version >= 300003)
current = (unsigned long) dereference(current)->if_link.tqe_next;
#else
+#ifdef __NetBSD__
@@ -99,11 +110,11 @@ $NetBSD: patch-ab,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $
}
/* Try to register our termination function. If it
-@@ -309,7 +336,11 @@
+@@ -309,7 +336,11 @@ char const* ifName(unsigned idx)
if (ptr) {
static char buffer[IFNAMSIZ + 1];
-+#ifdef __NetBSD__
++#if defined(__NetBSD__) || defined(__DragonFly__)
+ sprintf(buffer, "%.*s", IFNAMSIZ - 1, ptr->if_xname);
+#else
sprintf(buffer, "%.*s%d", IFNAMSIZ - 1, ptr->if_name, ptr->if_unit);