summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Mende <angelos@gentoo.org>2010-09-11 07:20:37 +0000
committerChristoph Mende <angelos@gentoo.org>2010-09-11 07:20:37 +0000
commit1f44341c15e1c797d8a4f76763974e82871dae0f (patch)
tree42fe1f355f97f409dc71aa0abc1678cc839561e3 /net-wireless
parentsed patch from Kevin Pyle to fix buffer overflow (bug #336603) (diff)
downloadhistorical-1f44341c15e1c797d8a4f76763974e82871dae0f.tar.gz
historical-1f44341c15e1c797d8a4f76763974e82871dae0f.tar.bz2
historical-1f44341c15e1c797d8a4f76763974e82871dae0f.zip
Fix compilation with 2.6.35 (bug #331961) and respect CFLAGS (bug #331963)
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/ndiswrapper/ChangeLog7
-rw-r--r--net-wireless/ndiswrapper/Manifest16
-rw-r--r--net-wireless/ndiswrapper/files/ndiswrapper-1.56-2.6.35.patch90
-rw-r--r--net-wireless/ndiswrapper/files/ndiswrapper-1.56-cflags.patch12
-rw-r--r--net-wireless/ndiswrapper/ndiswrapper-1.56.ebuild4
5 files changed, 114 insertions, 15 deletions
diff --git a/net-wireless/ndiswrapper/ChangeLog b/net-wireless/ndiswrapper/ChangeLog
index 9bbebbfdee3e..39b82d613349 100644
--- a/net-wireless/ndiswrapper/ChangeLog
+++ b/net-wireless/ndiswrapper/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-wireless/ndiswrapper
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ChangeLog,v 1.112 2010/07/09 15:38:43 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ChangeLog,v 1.113 2010/09/11 07:20:37 angelos Exp $
+
+ 06 Sep 2010; <angelos@gentoo.org> ndiswrapper-1.56.ebuild,
+ +files/ndiswrapper-1.56-2.6.35.patch,
+ +files/ndiswrapper-1.56-cflags.patch:
+ Fix compilation with 2.6.35 (bug #331961) and respect CFLAGS (bug #331963)
09 Jul 2010; Pacho Ramos <pacho@gentoo.org> ndiswrapper-1.56.ebuild:
stable amd64, bug 327299
diff --git a/net-wireless/ndiswrapper/Manifest b/net-wireless/ndiswrapper/Manifest
index f6a131474a39..75d0c2f300e6 100644
--- a/net-wireless/ndiswrapper/Manifest
+++ b/net-wireless/ndiswrapper/Manifest
@@ -1,18 +1,10 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX ndiswrapper-1.55-2.6.31.patch 549 RMD160 4f4a25b18de205116a79c5790b49c82316a22118 SHA1 ad48179ae62cb8e71a6a19d0ef0130a523245acc SHA256 8b13dc047acfa480022addfb38885079240f8addb6e259f535b82f446b4db480
+AUX ndiswrapper-1.56-2.6.35.patch 3369 RMD160 4fc4ab3c9e962370405893c8a54140a1c0cb585e SHA1 501b4d7c3ff3254fe3a3275d80eebddcb3869877 SHA256 d96cd5e7edbbe578b935394b7030a8de1f0e8c031662824021d30b2146c8dbf9
+AUX ndiswrapper-1.56-cflags.patch 421 RMD160 4f16ca9bd3155edab8fb3cf0f7eeeec20f6e9ea8 SHA1 fe52070e80a134dca90916f3301e518785f1e0fd SHA256 aa6192da73358cc0db1ff5a234537245e5f60ef06a4a73c1090190db25404595
AUX ndiswrapper-1.56-ldflags.patch 365 RMD160 cc52c077e0f36bec53c4f327bffaa4bf40c59602 SHA1 43280b74396d25d9ffd5a0e124b7e6511c06ab24 SHA256 d17f6d84b1dddbe2da2c35370e20ea51e1802e74496918fed4648cf0af66c304
DIST ndiswrapper-1.55.tar.gz 199019 RMD160 121574be765da889cdb3446af3facab840aa2054 SHA1 84f7b08347f09df109722dccfdf18cf439fbc3be SHA256 dc9ca11c8ff6eaf8b10d4e6a04e982ad46055dfefe619b5f79914aa4fb52f0fe
DIST ndiswrapper-1.56.tar.gz 200770 RMD160 2bbe46fe310999074c78bbfe0761cad3cbd012d8 SHA1 c461cf8e2c1f9e1f87e2a5c5e717f13d2fef5364 SHA256 a738e4271467dc9d40beeaabfc1f48ac0c0a57263b641c2a0edf6c045478d883
EBUILD ndiswrapper-1.55-r1.ebuild 2999 RMD160 678779f46797fde5699a5f62b8480a8a056e9578 SHA1 93f6fcf25e4154848b816ffb718e1cdb85069465 SHA256 3fa951bf0c35c17f92f8cdf25f99ebe9073cbac4075d4a870fd51921cdb59b4c
-EBUILD ndiswrapper-1.56.ebuild 3104 RMD160 c4e74276eeea7d06a13dbb1bc529cb03d6352920 SHA1 a945a027283c11a1df51059666fd600e7d649c1e SHA256 8b84cd521315375464e4f16b7b6fbbd2955558f0d7db57f6d1b913c399822af3
-MISC ChangeLog 20213 RMD160 08a848ec5b1ee3460f4998164e47c00d6e36ad29 SHA1 3fbbaf68c33f2087b68b5651f400497cb3dd4742 SHA256 7d689ed2832b08335ed632bf9f8f7dc7cd69fa104da7f68a6bd0788c380b4aa2
+EBUILD ndiswrapper-1.56.ebuild 3170 RMD160 4ea83b7e23b7436df5e45bce8558fef6abf63e55 SHA1 e80ed543476580ab39ebfe7a50089920d1501e35 SHA256 16e7b7b6369e1742f9aeee6e5b101f1b20b79ce56e761e0923bde48e3d85d868
+MISC ChangeLog 20434 RMD160 ddc95e5c1bc566c12863ae19a8a51fff3317e0c5 SHA1 93c1c005b6059bc8f7709a5d13f153671003762d SHA256 7c05518e36a56e23e1053e34ab92e721022387eaa64f7345e7f7f0ffb1bebca5
MISC metadata.xml 479 RMD160 0be4804aa2a6c2f15156b1866cf979cb34af0cef SHA1 613ebfb1aaae3a4c53aece4a44e95031dc374ce2 SHA256 3b6604467d120503201846a0201c60bc1426dcf697e4cf16db3293380959e819
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.15 (GNU/Linux)
-
-iEYEARECAAYFAkw3QokACgkQCaWpQKGI+9QoxACdF5T3V6C5WGUhd0Z0nznqKvrq
-84EAn30BunLL8MI4npuWL3XE/OnlUDzJ
-=05SR
------END PGP SIGNATURE-----
diff --git a/net-wireless/ndiswrapper/files/ndiswrapper-1.56-2.6.35.patch b/net-wireless/ndiswrapper/files/ndiswrapper-1.56-2.6.35.patch
new file mode 100644
index 000000000000..a87448006e68
--- /dev/null
+++ b/net-wireless/ndiswrapper/files/ndiswrapper-1.56-2.6.35.patch
@@ -0,0 +1,90 @@
+Index: driver/wrapndis.c
+===================================================================
+--- driver/wrapndis.c (revision 2723)
++++ driver/wrapndis.c (working copy)
+@@ -950,20 +950,34 @@ static void set_multicast_list(struct nd
+ packet_filter |= NDIS_PACKET_TYPE_PROMISCUOUS |
+ NDIS_PACKET_TYPE_ALL_LOCAL;
+ } else if (net_dev->flags & IFF_ALLMULTI ||
+- net_dev->mc_count > wnd->multicast_size) {
++ netdev_mc_count(net_dev) > wnd->multicast_size) {
+ packet_filter |= NDIS_PACKET_TYPE_ALL_MULTICAST;
+ TRACE2("0x%08x", packet_filter);
+- } else if (net_dev->mc_count > 0) {
++ } else if (netdev_mc_count(net_dev) > 0) {
+ int i, size;
+ char *buf;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)
++ struct netdev_hw_addr *ha;
++#else
+ struct dev_mc_list *mclist;
+- size = min(wnd->multicast_size, net_dev->mc_count);
+- TRACE2("%d, %d", wnd->multicast_size, net_dev->mc_count);
++#endif
++ size = min(wnd->multicast_size, netdev_mc_count(net_dev));
++ TRACE2("%d, %d", wnd->multicast_size, netdev_mc_count(net_dev));
+ buf = kmalloc(size * ETH_ALEN, GFP_KERNEL);
+ if (!buf) {
+ WARNING("couldn't allocate memory");
+ EXIT2(return);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)
++ i = 0;
++ netdev_for_each_mc_addr(ha, net_dev) {
++ if (i >= size)
++ break;
++ memcpy(buf + i * ETH_ALEN, ha->addr, ETH_ALEN);
++ TRACE2(MACSTRSEP, MAC2STR(ha->addr));
++ i++;
++ }
++#else
+ mclist = net_dev->mc_list;
+ for (i = 0; i < size && mclist; mclist = mclist->next) {
+ if (mclist->dmi_addrlen != ETH_ALEN)
+@@ -972,6 +986,7 @@ static void set_multicast_list(struct nd
+ TRACE2(MACSTRSEP, MAC2STR(mclist->dmi_addr));
+ i++;
+ }
++#endif
+ res = mp_set(wnd, OID_802_3_MULTICAST_LIST, buf, i * ETH_ALEN);
+ if (res == NDIS_STATUS_SUCCESS && i > 0)
+ packet_filter |= NDIS_PACKET_TYPE_MULTICAST;
+Index: driver/usb.c
+===================================================================
+--- driver/usb.c (revision 2723)
++++ driver/usb.c (working copy)
+@@ -191,7 +191,7 @@ static void wrap_free_urb(struct urb *ur
+ if (wrap_urb->flags & WRAP_URB_COPY_BUFFER) {
+ USBTRACE("freeing DMA buffer for URB: %p %p",
+ urb, urb->transfer_buffer);
+- usb_buffer_free(IRP_WRAP_DEVICE(irp)->usb.udev,
++ usb_free_coherent(IRP_WRAP_DEVICE(irp)->usb.udev,
+ urb->transfer_buffer_length,
+ urb->transfer_buffer, urb->transfer_dma);
+ }
+@@ -304,7 +304,7 @@ static struct urb *wrap_alloc_urb(struct
+ #endif
+ )) {
+ urb->transfer_buffer =
+- usb_buffer_alloc(wd->usb.udev, buf_len, alloc_flags,
++ usb_alloc_coherent(wd->usb.udev, buf_len, alloc_flags,
+ &urb->transfer_dma);
+ if (!urb->transfer_buffer) {
+ WARNING("couldn't allocate dma buf");
+Index: driver/ntoskernel.h
+===================================================================
+--- driver/ntoskernel.h (revision 2723)
++++ driver/ntoskernel.h (working copy)
+@@ -324,6 +324,12 @@ typedef u32 pm_message_t;
+ kmem_cache_create(name, size, align, flags, NULL)
+ #endif
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)
++#define netdev_mc_count(dev) ((dev)->mc_count)
++#define usb_alloc_coherent(dev, size, mem_flags, dma) (usb_buffer_alloc((dev), (size), (mem_flags), (dma)))
++#define usb_free_coherent(dev, size, addr, dma) (usb_buffer_free((dev), (size), (addr), (dma)))
++#endif
++
+ #include "winnt_types.h"
+ #include "ndiswrapper.h"
+ #include "pe_linker.h"
diff --git a/net-wireless/ndiswrapper/files/ndiswrapper-1.56-cflags.patch b/net-wireless/ndiswrapper/files/ndiswrapper-1.56-cflags.patch
new file mode 100644
index 000000000000..480274e31c7f
--- /dev/null
+++ b/net-wireless/ndiswrapper/files/ndiswrapper-1.56-cflags.patch
@@ -0,0 +1,12 @@
+diff -ur ndiswrapper-1.56.orig/utils/Makefile ndiswrapper-1.56/utils/Makefile
+--- ndiswrapper-1.56.orig/utils/Makefile 2010-02-11 03:09:32.000000000 +0100
++++ ndiswrapper-1.56/utils/Makefile 2010-08-10 01:33:36.199000011 +0200
+@@ -5,7 +5,7 @@
+ DRIVER_DIR ?= ../driver
+
+ CC = gcc
+-CFLAGS = -g -Wall -I$(DRIVER_DIR)
++CFLAGS += -Wall -I$(DRIVER_DIR)
+
+ DISTFILES=Makefile ndiswrapper loadndisdriver.c ndiswrapper-buginfo
+
diff --git a/net-wireless/ndiswrapper/ndiswrapper-1.56.ebuild b/net-wireless/ndiswrapper/ndiswrapper-1.56.ebuild
index 6fb49aaf0680..4cefa3ba7b44 100644
--- a/net-wireless/ndiswrapper/ndiswrapper-1.56.ebuild
+++ b/net-wireless/ndiswrapper/ndiswrapper-1.56.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ndiswrapper-1.56.ebuild,v 1.4 2010/07/09 15:38:43 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ndiswrapper-1.56.ebuild,v 1.5 2010/09/11 07:20:37 angelos Exp $
EAPI=2
inherit base linux-mod toolchain-funcs
@@ -17,7 +17,7 @@ DEPEND="sys-apps/pciutils"
RDEPEND="${DEPEND}
net-wireless/wireless-tools"
-PATCHES=( "${FILESDIR}"/${P}-ldflags.patch )
+PATCHES=( "${FILESDIR}"/${P}-cflags.patch "${FILESDIR}"/${P}-ldflags.patch "${FILESDIR}"/${P}-2.6.35.patch )
MODULE_NAMES="ndiswrapper(misc:${S}/driver)"
BUILD_TARGETS="all"
MODULESD_NDISWRAPPER_ALIASES=("wlan0 ndiswrapper")