summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Brix Andersen <brix@gentoo.org>2006-01-11 12:30:47 +0000
committerHenrik Brix Andersen <brix@gentoo.org>2006-01-11 12:30:47 +0000
commit53df385f2149230c0da050a246b6d50bf5335c7d (patch)
tree00797eb9e56876af75b6dce79a0d528497a9d5b5 /net-wireless
parentAllow compiling against older kernels, bug #113155. (diff)
downloadgentoo-2-53df385f2149230c0da050a246b6d50bf5335c7d.tar.gz
gentoo-2-53df385f2149230c0da050a246b6d50bf5335c7d.tar.bz2
gentoo-2-53df385f2149230c0da050a246b6d50bf5335c7d.zip
Allow compiling against older kernels.
(Portage version: 2.0.53)
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/ipw2100/ChangeLog6
-rw-r--r--net-wireless/ipw2100/files/ipw2100-1.1.4-old_kernel_fix.patch33
-rw-r--r--net-wireless/ipw2100/ipw2100-1.1.4.ebuild7
3 files changed, 43 insertions, 3 deletions
diff --git a/net-wireless/ipw2100/ChangeLog b/net-wireless/ipw2100/ChangeLog
index 70877dccd0f5..90539797cdb7 100644
--- a/net-wireless/ipw2100/ChangeLog
+++ b/net-wireless/ipw2100/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-wireless/ipw2100
# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw2100/ChangeLog,v 1.87 2006/01/09 11:26:12 brix Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw2100/ChangeLog,v 1.88 2006/01/11 12:30:47 brix Exp $
+
+ 11 Jan 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2100-1.1.4-old_kernel_fix.patch, ipw2100-1.1.4.ebuild:
+ Allow compiling against older kernels.
*ipw2100-1.1.4 (09 Jan 2006)
diff --git a/net-wireless/ipw2100/files/ipw2100-1.1.4-old_kernel_fix.patch b/net-wireless/ipw2100/files/ipw2100-1.1.4-old_kernel_fix.patch
new file mode 100644
index 000000000000..d3eb90c7397f
--- /dev/null
+++ b/net-wireless/ipw2100/files/ipw2100-1.1.4-old_kernel_fix.patch
@@ -0,0 +1,33 @@
+diff -urp ipw2100-1.1.4/ipw2100.c ipw2100-1.1.4-fix/ipw2100.c
+--- ipw2100-1.1.4/ipw2100.c 2006-01-11 13:39:51.000000000 +0800
++++ ipw2100-1.1.4-fix/ipw2100.c 2006-01-11 13:39:47.000000000 +0800
+@@ -296,16 +296,6 @@ static const char *command_types[] = {
+ };
+ #endif
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+-static void *kzalloc(size_t size, gfp_t flags)
+-{
+- void *ret = kmalloc(size, flags);
+- if (ret)
+- memset(ret, 0, size);
+- return ret;
+-}
+-#endif
+-
+ /* Pre-decl until we get the code solid and then we can clean it up */
+ static void ipw2100_tx_send_commands(struct ipw2100_priv *priv);
+ static void ipw2100_tx_send_data(struct ipw2100_priv *priv);
+@@ -6440,8 +6430,12 @@ static struct net_device *ipw2100_alloc_
+ dev->ethtool_ops = &ipw2100_ethtool_ops;
+ dev->tx_timeout = ipw2100_tx_timeout;
+ dev->wireless_handlers = &ipw2100_wx_handler_def;
++#if IW_HANDLER_VERSION > 6
+ priv->wireless_data.ieee80211 = priv->ieee;
+ dev->wireless_data = &priv->wireless_data;
++#else
++ dev->get_wireless_stats = ipw2100_wx_wireless_stats;
++#endif
+ dev->set_mac_address = ipw2100_set_address;
+ dev->watchdog_timeo = 3 * HZ;
+ dev->irq = 0;
diff --git a/net-wireless/ipw2100/ipw2100-1.1.4.ebuild b/net-wireless/ipw2100/ipw2100-1.1.4.ebuild
index 1dfabebdb8e2..9b8539da4439 100644
--- a/net-wireless/ipw2100/ipw2100-1.1.4.ebuild
+++ b/net-wireless/ipw2100/ipw2100-1.1.4.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw2100/ipw2100-1.1.4.ebuild,v 1.1 2006/01/09 11:26:12 brix Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw2100/ipw2100-1.1.4.ebuild,v 1.2 2006/01/11 12:30:47 brix Exp $
-inherit linux-mod
+inherit eutils linux-mod
# The following works with both pre-releases and releases
MY_P=${P/_/-}
@@ -60,6 +60,9 @@ src_unpack() {
unpack ${A}
+ cd "${S}"
+ epatch ${FILESDIR}/${P}-old_kernel_fix.patch
+
use debug && debug="y"
sed -i -e "s:^\(CONFIG_IPW_DEBUG\)=.*:\1=$debug:" ${S}/Makefile
}