[PATCH] Fixed libnl-tiny support

Dima Krasner dima at dimakrasner.com
Tue Nov 3 14:38:26 PST 2015


Hi,

This patch fixes libnl-tiny support in wpa_supplicant. It's important, so we can have small, static wpa_supplicant binaries.

Cheers,
Dima

>From 63f8959983605006e022648f58dd56aa25588d88 Mon Sep 17 00:00:00 2001
From: Dima Krasner <dima at dimakrasner.com>
Date: Wed, 4 Nov 2015 00:36:08 +0200
Subject: [PATCH] Fixed libnl-tiny support

---
 src/drivers/driver_nl80211.c | 7 +++++++
 src/drivers/drivers.mak      | 1 +
 2 files changed, 8 insertions(+)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e83a3df..f3cc806 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -39,6 +39,13 @@
 #include "driver_nl80211.h"
 
 
+#ifdef CONFIG_LIBNL_TINY
+#define nl_handle nl_sock
+#define nl_handle_alloc_cb nl_socket_alloc_cb
+#define nl_handle_destroy nl_socket_free
+#endif
+
+
 #ifndef CONFIG_LIBNL20
 /*
  * libnl 1.1 has a bug, it tries to allocate socket numbers densely
diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak
index c4f5f97..2ac6d48 100644
--- a/src/drivers/drivers.mak
+++ b/src/drivers/drivers.mak
@@ -172,6 +172,7 @@ ifdef CONFIG_LIBNL32
 else
   ifdef CONFIG_LIBNL_TINY
     DRV_LIBS += -lnl-tiny
+    DRV_CFLAGS += -DCONFIG_LIBNL_TINY
   else
     DRV_LIBS += -lnl
   endif
-- 
1.9.1



-- 
Dima Krasner <dima at dimakrasner.com>




More information about the Hostap mailing list