summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavoz@gentoo.org>2007-07-13 14:51:37 +0000
committerGustavo Zacarias <gustavoz@gentoo.org>2007-07-13 14:51:37 +0000
commit6dcdbcef13f7fc936ce3942a928e9d5b2a1ef631 (patch)
tree960a16e4a559a042ab61d3ec66a84b94f5b542e3 /net-misc
parentalpha/ia64 stable wrt #184615 (diff)
downloadgentoo-2-6dcdbcef13f7fc936ce3942a928e9d5b2a1ef631.tar.gz
gentoo-2-6dcdbcef13f7fc936ce3942a928e9d5b2a1ef631.tar.bz2
gentoo-2-6dcdbcef13f7fc936ce3942a928e9d5b2a1ef631.zip
Fix to build on 2.6.22 kernels, thanks to Kai Lippok for pointing it out
(Portage version: 2.1.2.9)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/zaptel/ChangeLog6
-rw-r--r--net-misc/zaptel/files/zaptel-1.2.18-2.6.22.diff34
-rw-r--r--net-misc/zaptel/zaptel-1.2.18.ebuild3
3 files changed, 41 insertions, 2 deletions
diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog
index b2b09f214266..0f3e47472419 100644
--- a/net-misc/zaptel/ChangeLog
+++ b/net-misc/zaptel/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-misc/zaptel
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.94 2007/07/12 21:13:04 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.95 2007/07/13 14:51:37 gustavoz Exp $
+
+ 13 Jul 2007; Gustavo Zacarias <gustavoz@gentoo.org>
+ +files/zaptel-1.2.18-2.6.22.diff, zaptel-1.2.18.ebuild:
+ Fix to build on 2.6.22 kernels, thanks to Kai Lippok for pointing it out
*zaptel-1.2.18 (12 Jul 2007)
diff --git a/net-misc/zaptel/files/zaptel-1.2.18-2.6.22.diff b/net-misc/zaptel/files/zaptel-1.2.18-2.6.22.diff
new file mode 100644
index 000000000000..57ee0c023d73
--- /dev/null
+++ b/net-misc/zaptel/files/zaptel-1.2.18-2.6.22.diff
@@ -0,0 +1,34 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## kernel_2.6.22.dpatch by Dermot Bradley <dermot.bradley@sla-networks.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Code changes required for linux 2.6.22.
+
+@DPATCH@
+diff -urN zaptel-1.2.18.SLA/ztd-eth.c zaptel-1.2.18.SLA.new/ztd-eth.c
+--- zaptel-1.2.18.SLA/ztd-eth.c 2007-01-31 19:01:33.000000000 +0000
++++ zaptel-1.2.18.SLA.new/ztd-eth.c 2007-07-03 03:10:50.000000000 +0100
+@@ -92,7 +92,11 @@
+ {
+ struct zt_span *span;
+ struct ztdeth_header *zh;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ zh = (struct ztdeth_header *)skb->network_header;
++#else
+ zh = (struct ztdeth_header *)skb->nh.raw;
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
+ span = ztdeth_getspan(eth_hdr(skb)->h_source, zh->subaddr);
+ #else
+@@ -171,7 +175,11 @@
+
+ /* Setup protocol and such */
+ skb->protocol = __constant_htons(ETH_P_ZTDETH);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ skb->network_header = skb->data;
++#else
+ skb->nh.raw = skb->data;
++#endif
+ skb->dev = dev;
+ if (dev->hard_header)
+ dev->hard_header(skb, dev, ETH_P_ZTDETH, addr, dev->dev_addr, skb->len);
diff --git a/net-misc/zaptel/zaptel-1.2.18.ebuild b/net-misc/zaptel/zaptel-1.2.18.ebuild
index dc4802f49d77..d65d9574aaba 100644
--- a/net-misc/zaptel/zaptel-1.2.18.ebuild
+++ b/net-misc/zaptel/zaptel-1.2.18.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.18.ebuild,v 1.1 2007/07/12 21:13:04 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.18.ebuild,v 1.2 2007/07/13 14:51:37 gustavoz Exp $
inherit toolchain-funcs eutils linux-mod
@@ -169,6 +169,7 @@ src_unpack() {
unpack ${A}
cd ${S}
+ epatch ${FILESDIR}/${P}-2.6.22.diff
epatch ${FILESDIR}/${P}-gentoo.diff
epatch ${FILESDIR}/zaptel-1.2.9.1-ar.patch