summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjarke Istrup Pedersen <gurligebis@gentoo.org>2011-09-09 23:17:31 +0000
committerBjarke Istrup Pedersen <gurligebis@gentoo.org>2011-09-09 23:17:31 +0000
commit581f1c0da6ca3e671db8e280601af27090f54e96 (patch)
tree445e87c72f416a305cd8ef178c53e8434186cd64 /net-wireless/iw/files
parentSwitch JNLP dep once again, bug #382351. (diff)
downloadgentoo-2-581f1c0da6ca3e671db8e280601af27090f54e96.tar.gz
gentoo-2-581f1c0da6ca3e671db8e280601af27090f54e96.tar.bz2
gentoo-2-581f1c0da6ca3e671db8e280601af27090f54e96.zip
Bumping to 3.1
(Portage version: 2.2.0_alpha54/cvs/Linux i686)
Diffstat (limited to 'net-wireless/iw/files')
-rw-r--r--net-wireless/iw/files/iw-3.1_libnl-3-support.patch88
1 files changed, 88 insertions, 0 deletions
diff --git a/net-wireless/iw/files/iw-3.1_libnl-3-support.patch b/net-wireless/iw/files/iw-3.1_libnl-3-support.patch
new file mode 100644
index 000000000000..001d3a64c3b4
--- /dev/null
+++ b/net-wireless/iw/files/iw-3.1_libnl-3-support.patch
@@ -0,0 +1,88 @@
+diff -aurp a/iw.c b/iw.c
+--- a/iw.c 2011-09-09 23:08:55.539173966 +0000
++++ b/iw.c 2011-09-09 23:10:31.139170016 +0000
+@@ -23,9 +23,8 @@
+ #include "nl80211.h"
+ #include "iw.h"
+
+-#ifndef CONFIG_LIBNL20
+-/* libnl 2.0 compatibility code */
+-
++/* libnl 1.x compatibility code */
++#if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30) && !defined(CONFIG_LIBNL31)
+ static inline struct nl_handle *nl_socket_alloc(void)
+ {
+ return nl_handle_alloc();
+@@ -45,7 +44,7 @@ static inline int __genl_ctrl_alloc_cach
+ return 0;
+ }
+ #define genl_ctrl_alloc_cache __genl_ctrl_alloc_cache
+-#endif /* CONFIG_LIBNL20 */
++#endif /* CONFIG_LIBNL20 && CONFIG_LIBNL30 && CONFIG_LIBNL31 */
+
+ int iw_debug = 0;
+
+diff -aurp a/iw.h b/iw.h
+--- a/iw.h 2011-09-09 23:08:55.539173966 +0000
++++ b/iw.h 2011-09-09 23:11:28.149167067 +0000
+@@ -11,7 +11,8 @@
+
+ #define ETH_ALEN 6
+
+-#ifndef CONFIG_LIBNL20
++/* libnl 1.x compatibility code */
++#if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30) && !defined(CONFIG_LIBNL31)
+ # define nl_sock nl_handle
+ #endif
+
+diff -aurp a/Makefile b/Makefile
+--- a/Makefile 2011-09-09 23:08:55.539173966 +0000
++++ b/Makefile 2011-09-09 23:12:49.528163734 +0000
+@@ -24,6 +24,8 @@ ALL = iw
+
+ NL1FOUND := $(shell $(PKG_CONFIG) --atleast-version=1 libnl-1 && echo Y)
+ NL2FOUND := $(shell $(PKG_CONFIG) --atleast-version=2 libnl-2.0 && echo Y)
++NL3FOUND := $(shell $(PKG_CONFIG) --atleast-version=3 libnl-3.0 && echo Y)
++NL31FOUND := $(shell $(PKG_CONFIG) --atleast-version=3 libnl-3.1 && echo Y)
+
+ ifeq ($(NL1FOUND),Y)
+ NLLIBNAME = libnl-1
+@@ -35,6 +37,18 @@ LIBS += -lnl-genl
+ NLLIBNAME = libnl-2.0
+ endif
+
++ifeq ($(NL3FOUND),Y)
++CFLAGS += -DCONFIG_LIBNL30
++LIBS += -lnl-genl
++NLLIBNAME = libnl-3.0
++endif
++
++ifeq ($(NL31FOUND),Y)
++CFLAGS += -DCONFIG_LIBNL31
++LIBS += -lnl-genl
++NLLIBNAME = libnl-3.1
++endif
++
+ ifeq ($(NLLIBNAME),)
+ $(error Cannot find development files for any supported version of libnl)
+ endif
+@@ -53,6 +67,10 @@ endif
+ all: version_check $(ALL)
+
+ version_check:
++ifeq ($(NL31FOUND),Y)
++else
++ifeq ($(NL3FOUND),Y)
++else
+ ifeq ($(NL2FOUND),Y)
+ else
+ ifeq ($(NL1FOUND),Y)
+@@ -60,6 +78,8 @@ else
+ $(error No libnl found)
+ endif
+ endif
++endif
++endif
+
+
+ VERSION_OBJS := $(filter-out version.o, $(OBJS))