diff options
author | Gustavo Zacarias <gustavoz@gentoo.org> | 2007-07-13 14:51:37 +0000 |
---|---|---|
committer | Gustavo Zacarias <gustavoz@gentoo.org> | 2007-07-13 14:51:37 +0000 |
commit | d32f86e7e83b1aa63b969c27c26206faef054d94 (patch) | |
tree | ef67fea3746669ffa8d5254b559c720c92ed04c9 /net-misc/zaptel/files | |
parent | alpha/ia64 stable wrt #184615 (diff) | |
download | historical-d32f86e7e83b1aa63b969c27c26206faef054d94.tar.gz historical-d32f86e7e83b1aa63b969c27c26206faef054d94.tar.bz2 historical-d32f86e7e83b1aa63b969c27c26206faef054d94.zip |
Fix to build on 2.6.22 kernels, thanks to Kai Lippok for pointing it out
Package-Manager: portage-2.1.2.9
Diffstat (limited to 'net-misc/zaptel/files')
-rw-r--r-- | net-misc/zaptel/files/zaptel-1.2.18-2.6.22.diff | 34 |
1 files changed, 34 insertions, 0 deletions
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); |