[PATCH] wpa_supplicant: fix libnl-tiny support
Dima Krasner
dima at dimakrasner.com
Sat Mar 5 07:48:56 PST 2016
On Wed, 02 Mar 2016 15:00:32 +0100
Johannes Berg <johannes at sipsolutions.net> wrote:
> the code already has the ability to deal with libnl 1.1
> (or compatible) API, so you don't need to redefine everything afaict.
It's compatible with 2.0 and 3.x, not with 1.1 as far as I see.
Here's a cleaner patch, more in line with the coding style:
Signed-off-by: Dima Krasner <dima at dimakrasner.com>
---
src/drivers/driver_nl80211.h | 7 +++++++
src/drivers/drivers.mak | 2 ++
2 files changed, 9 insertions(+)
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
index 4fa7d5f..b385fb9 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -17,6 +17,13 @@
#include "utils/list.h"
#include "driver.h"
+#ifdef CONFIG_LIBNL_TINY
+/* libnl-tiny compatibility code */
+#define nl_handle nl_sock
+#define nl_handle_alloc_cb nl_socket_alloc_cb
+#define nl_handle_destroy nl_socket_free
+#endif
+
#ifdef CONFIG_LIBNL20
/* libnl 2.0 compatibility code */
#define nl_handle nl_sock
diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak
index c4f5f97..d3b8185 100644
--- a/src/drivers/drivers.mak
+++ b/src/drivers/drivers.mak
@@ -56,6 +56,7 @@ endif
else
ifdef CONFIG_LIBNL_TINY
DRV_LIBS += -lnl-tiny
+ DRV_CFLAGS += -DCONFIG_LIBNL_TINY
else
ifndef CONFIG_OSX
DRV_LIBS += -lnl
@@ -172,6 +173,7 @@ ifdef CONFIG_LIBNL32
else
ifdef CONFIG_LIBNL_TINY
DRV_LIBS += -lnl-tiny
+ DRV_CFLAGS += -DCONFIG_LIBNL_TINY
else
DRV_LIBS += -lnl
endif
--
2.1.4
--
Dima Krasner <dima at dimakrasner.com>
More information about the Hostap
mailing list