pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/wminet PR#46318 net/wminet: Fix for DragonFly
details: https://anonhg.NetBSD.org/pkgsrc/rev/7189689eb48b
branches: trunk
changeset: 603866:7189689eb48b
user: marino <marino%pkgsrc.org@localhost>
date: Tue May 15 14:05:01 2012 +0000
description:
PR#46318 net/wminet: Fix for DragonFly
diffstat:
net/wminet/distinfo | 4 ++--
net/wminet/patches/patch-ab | 26 +++++++++++++++-----------
2 files changed, 17 insertions(+), 13 deletions(-)
diffs (108 lines):
diff -r b3f3218a74d0 -r 7189689eb48b net/wminet/distinfo
--- a/net/wminet/distinfo Tue May 15 13:20:03 2012 +0000
+++ b/net/wminet/distinfo Tue May 15 14:05:01 2012 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.5 2006/03/23 17:31:05 joerg Exp $
+$NetBSD: distinfo,v 1.6 2012/05/15 14:05:01 marino 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) = 5b0cf1f48d7f21a29445519cfa6169bcf28933f8
+SHA1 (patch-ab) = 6bf84de29b6ac4d685c85dad3be22df1a5424630
diff -r b3f3218a74d0 -r 7189689eb48b net/wminet/patches/patch-ab
--- a/net/wminet/patches/patch-ab Tue May 15 13:20:03 2012 +0000
+++ b/net/wminet/patches/patch-ab Tue May 15 14:05:01 2012 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.2 2006/03/23 17:31:06 joerg Exp $
+$NetBSD: patch-ab,v 1.3 2012/05/15 14:05:01 marino Exp $
--- if.c.orig 1998-10-12 02:13:16.000000000 +0000
+++ if.c
-@@ -12,12 +12,13 @@
+@@ -12,12 +12,17 @@
#include <unistd.h>
#include <limits.h>
#include <err.h>
@@ -13,11 +13,15 @@
#include <sys/socket.h>
#include <net/if.h>
-#if (__FreeBSD_version >= 300003)
-+#if defined(__DragonFly__) || (defined(__FreeBSD_version) && __FreeBSD_version >= 300003)
++#if defined(__DragonFly__)
++#define _KERNEL_STRUCTURES
++#include <net/if_var.h>
++#include <net/if_types.h>
++#elif 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
+@@ -89,7 +94,11 @@ static int addIfData(unsigned long theAd
if (!newData) {
size -= IF_STEP;
fprintf(stderr, "wmnet: Warning -- low memory; "
@@ -29,7 +33,7 @@
return 0;
}
-@@ -118,8 +123,12 @@ static int addIfData(unsigned long theAd
+@@ -118,8 +127,12 @@ static int addIfData(unsigned long theAd
ptr->flags = 0;
#ifndef NDEBUG
@@ -42,7 +46,7 @@
#endif
// Bump the total.
-@@ -161,6 +170,7 @@ static struct ifnet const* dereference(u
+@@ -161,6 +174,7 @@ static struct ifnet const* dereference(u
return &d;
else if (sizeof(d) == kvm_read(kd, a, &d, sizeof(d))) {
@@ -50,7 +54,7 @@
/* 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,22 +188,32 @@ static struct ifnet const* dereference(u
+@@ -178,6 +192,7 @@ static struct ifnet const* dereference(u
to look at. While debugging, set these to NULL to trap
any attempts. */
@@ -58,7 +62,7 @@
d.if_softc = 0;
#if (__FreeBSD_version >= 300003)
d.if_addrhead.tqh_first = 0;
- #else
+@@ -185,15 +200,24 @@ static struct ifnet const* dereference(u
d.if_addrlist = 0;
#endif
d.if_bpf = 0;
@@ -83,7 +87,7 @@
}
/*------------------------------------------------------------------------------
-@@ -233,6 +253,9 @@ int ifInit(void)
+@@ -233,6 +257,9 @@ int ifInit(void)
{ "" }
};
@@ -93,7 +97,7 @@
/* Try to pull the address for the global kernel variable,
ifnet. This variable is the root of the singly-linked list
of network interfaces. */
-@@ -248,11 +271,15 @@ int ifInit(void)
+@@ -248,11 +275,15 @@ int ifInit(void)
while (current) {
addIfData(current);
@@ -110,7 +114,7 @@
}
/* Try to register our termination function. If it
-@@ -309,7 +336,11 @@ char const* ifName(unsigned idx)
+@@ -309,7 +340,11 @@ char const* ifName(unsigned idx)
if (ptr) {
static char buffer[IFNAMSIZ + 1];
Home |
Main Index |
Thread Index |
Old Index