From 97777f8363a49d70df52e031f3fead886ef05bf9 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 31 Jan 2013 12:08:00 +0100 Subject: [PATCH] btfilter: add patch to support libnl-3 Now that btfilter supports libnl-3, remove DEL's preferred version of libnl on 2.0 Signed-off-by: Javier Viguera --- meta-digi-del/conf/distro/del.conf | 1 - .../0001-enable-libnl3.patch | 75 +++++++++++++++++++ .../btfilter/btfilter_v3.2p11-b3.2.0.300.bb | 1 + 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 meta-digi-del/recipes-connectivity/btfilter/btfilter-v3.2p11-b3.2.0.300/0001-enable-libnl3.patch diff --git a/meta-digi-del/conf/distro/del.conf b/meta-digi-del/conf/distro/del.conf index 214187719..e99a236e8 100644 --- a/meta-digi-del/conf/distro/del.conf +++ b/meta-digi-del/conf/distro/del.conf @@ -32,7 +32,6 @@ PREFERRED_VERSION_linux-yocto_qemux86-64 ?= "3.4%" PREFERRED_VERSION_linux-yocto_qemuarm ?= "3.4%" PREFERRED_VERSION_linux-yocto_qemumips ?= "3.4%" PREFERRED_VERSION_linux-yocto_qemuppc ?= "3.4%" -PREFERRED_VERSION_libnl ?= "2.0" SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" diff --git a/meta-digi-del/recipes-connectivity/btfilter/btfilter-v3.2p11-b3.2.0.300/0001-enable-libnl3.patch b/meta-digi-del/recipes-connectivity/btfilter/btfilter-v3.2p11-b3.2.0.300/0001-enable-libnl3.patch new file mode 100644 index 000000000..6591dc68c --- /dev/null +++ b/meta-digi-del/recipes-connectivity/btfilter/btfilter-v3.2p11-b3.2.0.300/0001-enable-libnl3.patch @@ -0,0 +1,75 @@ +From: Javier Viguera +Date: Thu, 31 Jan 2013 11:23:37 +0100 +Subject: [PATCH] enable-libnl3 + +Signed-off-by: Javier Viguera +--- + Makefile | 8 +++++++- + nl80211_utils.c | 4 ++-- + nl80211_utils.h | 2 +- + 3 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 797dc51..66f469e 100644 +--- a/Makefile ++++ b/Makefile +@@ -55,17 +55,23 @@ LIBS= -ldbus-1 -lpthread -lrt -lbluetooth + + 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) + + ifeq ($(NL1FOUND),Y) ++CFLAGS += -DCONFIG_LIBNL1 + NLLIBNAME = libnl-1 + endif + + ifeq ($(NL2FOUND),Y) +-CFLAGS += -DCONFIG_LIBNL20 + LIBS += -lnl-genl + NLLIBNAME = libnl-2.0 + endif + ++ifeq ($(NL3FOUND),Y) ++LIBS += -lnl-genl ++NLLIBNAME = libnl-3.0 ++endif ++ + #ifeq ($(NLLIBNAME),) + #$(error Cannot find development files for any supported version of libnl) + #endif +diff --git a/nl80211_utils.c b/nl80211_utils.c +index 4689044..2957f2e 100644 +--- a/nl80211_utils.c ++++ b/nl80211_utils.c +@@ -9,7 +9,7 @@ + #include + #include "nl80211_utils.h" + +-#ifndef CONFIG_LIBNL20 ++#ifdef CONFIG_LIBNL1 + /* libnl 2.0 compatibility code */ + + static inline int __genl_ctrl_alloc_cache(struct nl_sock *h, struct nl_cache **cache) +@@ -24,7 +24,7 @@ static inline int __genl_ctrl_alloc_cache(struct nl_sock *h, struct nl_cache **c + #define nl_socket_alloc nl_handle_alloc + #define nl_socket_free nl_handle_destroy + +-#endif /* CONFIG_LIBNL20 */ ++#endif /* CONFIG_LIBNL1 */ + + int iw_debug = 0; + +diff --git a/nl80211_utils.h b/nl80211_utils.h +index e58767a..e8c482a 100644 +--- a/nl80211_utils.h ++++ b/nl80211_utils.h +@@ -11,7 +11,7 @@ + #include + #include + +-#ifndef CONFIG_LIBNL20 ++#ifdef CONFIG_LIBNL1 + #define nl_sock nl_handle + #endif + diff --git a/meta-digi-del/recipes-connectivity/btfilter/btfilter_v3.2p11-b3.2.0.300.bb b/meta-digi-del/recipes-connectivity/btfilter/btfilter_v3.2p11-b3.2.0.300.bb index e3d3534ef..d1ad6b689 100644 --- a/meta-digi-del/recipes-connectivity/btfilter/btfilter_v3.2p11-b3.2.0.300.bb +++ b/meta-digi-del/recipes-connectivity/btfilter/btfilter_v3.2p11-b3.2.0.300.bb @@ -9,6 +9,7 @@ PR = "r0" FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI = "${DIGI_LOG_MIRROR}${PN}-${PV}.tar.bz2 \ + file://0001-enable-libnl3.patch \ file://S65bluez-bg.sh" S = "${WORKDIR}/${PN}-${PV}"