diff options
author | vs <vs@FreeBSD.org> | 2004-06-19 15:11:59 +0800 |
---|---|---|
committer | vs <vs@FreeBSD.org> | 2004-06-19 15:11:59 +0800 |
commit | c07718e5cc6f3ae7e9b0a988a01848c4d639a9e0 (patch) | |
tree | bf86ee435825429aff2334f32fb5d664de0d578b | |
parent | e5add48351c924363d350b88e93675ffe52a56b8 (diff) | |
download | freebsd-ports-gnome-c07718e5cc6f3ae7e9b0a988a01848c4d639a9e0.tar.gz freebsd-ports-gnome-c07718e5cc6f3ae7e9b0a988a01848c4d639a9e0.tar.zst freebsd-ports-gnome-c07718e5cc6f3ae7e9b0a988a01848c4d639a9e0.zip |
- Unbreak on post-5.2.1 (Thanks to Gleb Smirnoff)
- Nuke plist in favour of PLIST-foo
-rw-r--r-- | net/ng_daphne/Makefile | 9 | ||||
-rw-r--r-- | net/ng_daphne/files/extra-patch-ng_daphne.c | 86 | ||||
-rw-r--r-- | net/ng_daphne/pkg-plist | 3 |
3 files changed, 93 insertions, 5 deletions
diff --git a/net/ng_daphne/Makefile b/net/ng_daphne/Makefile index 3e901d8904a2..a759d660aa77 100644 --- a/net/ng_daphne/Makefile +++ b/net/ng_daphne/Makefile @@ -15,8 +15,6 @@ COMMENT= A simple netgraph module for multihop ad hoc networks .include <bsd.port.pre.mk> -BROKEN= "Does not compile" - .if !exists(/usr/src/sys/netgraph/netgraph.h) IGNORE= "Requires kernel source /usr/src/sys to build" .endif @@ -25,6 +23,13 @@ IGNORE= "Requires kernel source /usr/src/sys to build" IGNORE= "Requires new netgraph architecture ng_item to build" .endif +.if ${OSVERSION} > 502010 +EXTRA_PATCHES= ${FILESDIR}/extra-patch-ng_daphne.c +.endif + +PLIST_FILES= lib/ng_daphne.ko %%DOCSDIR%%/README +PLIST_DIRS= %%DOCSDIR%% + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/ng_daphne.ko ${PREFIX}/lib @${MKDIR} ${DOCSDIR} diff --git a/net/ng_daphne/files/extra-patch-ng_daphne.c b/net/ng_daphne/files/extra-patch-ng_daphne.c new file mode 100644 index 000000000000..484e445e43ef --- /dev/null +++ b/net/ng_daphne/files/extra-patch-ng_daphne.c @@ -0,0 +1,86 @@ +--- ng_daphne.c.orig Fri Feb 13 13:08:06 2004 ++++ ng_daphne.c Wed Jun 9 13:00:20 2004 +@@ -108,7 +108,7 @@ + NGM_DAPHNE_COOKIE, + NGM_DAPHNE_SET_ENADDR, + "setenaddr", +- &ng_ether_enaddr_type, ++ &ng_parse_enaddr_type, + NULL + }, + { +@@ -116,7 +116,7 @@ + NGM_DAPHNE_GET_ENADDR, + "getenaddr", + NULL, +- &ng_ether_enaddr_type ++ &ng_parse_enaddr_type + }, + { 0 } + }; +@@ -126,18 +126,16 @@ + * Node type descriptor + */ + static struct ng_type ng_daphne_typestruct = { +- NG_ABI_VERSION, +- NG_DAPHNE_NODE_TYPE, +- NULL, +- ng_daphne_constructor, +- ng_daphne_rcvmsg, +- ng_daphne_shutdown, +- ng_daphne_newhook, +- NULL, +- ng_daphne_connect, +- ng_daphne_rcvdata, +- ng_daphne_disconnect, +- ng_daphne_cmdlist, ++ .version = NG_ABI_VERSION, ++ .name = NG_DAPHNE_NODE_TYPE, ++ .constructor = ng_daphne_constructor, ++ .rcvmsg = ng_daphne_rcvmsg, ++ .shutdown = ng_daphne_shutdown, ++ .newhook = ng_daphne_newhook, ++ .connect = ng_daphne_connect, ++ .rcvdata = ng_daphne_rcvdata, ++ .disconnect = ng_daphne_disconnect, ++ .cmdlist = ng_daphne_cmdlist, + }; + + NETGRAPH_INIT(daphne, &ng_daphne_typestruct); +@@ -311,22 +309,18 @@ + /* The peer node is eiface. If we know out hardware address, let it know */ + if (priv->myRowHead) + { +- struct ng_eiface_par *eiAddr; ++ struct ether_addr *eiAddr; + +- NG_MKMESSAGE (msg, NGM_EIFACE_COOKIE, NGM_EIFACE_SET, sizeof (struct ng_eiface_par), M_NOWAIT); ++ NG_MKMESSAGE (msg, NGM_EIFACE_COOKIE, NGM_EIFACE_SET, sizeof (struct ether_addr), M_NOWAIT); + + if (msg == NULL) + return (ENOMEM); + + /* Fill up msg data */ +- eiAddr = (struct ng_eiface_par *)(msg->data); ++ eiAddr = (struct ether_addr *)(msg->data); + +- eiAddr->oct0 = priv->myRowHead->etherAddr[0]; +- eiAddr->oct1 = priv->myRowHead->etherAddr[1]; +- eiAddr->oct2 = priv->myRowHead->etherAddr[2]; +- eiAddr->oct3 = priv->myRowHead->etherAddr[3]; +- eiAddr->oct4 = priv->myRowHead->etherAddr[4]; +- eiAddr->oct5 = priv->myRowHead->etherAddr[5]; ++ bcopy((void *)priv->myRowHead->etherAddr, ++ (void *)&eiAddr, sizeof(struct ether_addr)); + + /* Send message to this node */ + NG_SEND_MSG_ID (error, node, msg, NG_PEER_NODE(hook)->nd_ID, 0); +@@ -1208,7 +1202,7 @@ + { + FREE_CHAIN (p_tempRowHead->neighbours, rtElem); + p_tempRowHead->neighbours = NULL; +- p_tempRowHead->numNeighb = NULL; ++ p_tempRowHead->numNeighb = 0; + p_tempRowHead->routingSeqNum = 0; + p_tempRowHead->routingSeqNumTimer = 0; + diff --git a/net/ng_daphne/pkg-plist b/net/ng_daphne/pkg-plist deleted file mode 100644 index b28f2a48e755..000000000000 --- a/net/ng_daphne/pkg-plist +++ /dev/null @@ -1,3 +0,0 @@ -lib/ng_daphne.ko -%%DOCSDIR%%/README -@dirrm %%DOCSDIR%% |