[PATCH 2/2] Android: Fix nl80211 build if BOARD_*_PRIVATE_LIB is unspecified

Kevin Cernekee cernekee
Fri Jun 19 17:22:30 PDT 2015


From: Kevin Cernekee <cernekee at google.com>

wpa_supplicant has stub functions if the external p2p symbols are
unavailable, but the build still fails if the
wpa_driver_nl80211_driver_cmd symbol is missing.  Fix this by leaving the
function pointer NULL.  This is safe because wpa_drv_driver_cmd() performs
a NULL check.

Signed-off-by: Kevin Cernekee <cernekee at google.com>
---
 src/drivers/driver_nl80211.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 02aa6d3a0c45..c08d99651ac3 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -8510,7 +8510,9 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
 	.set_ap_wps_ie = wpa_driver_set_ap_wps_p2p_ie,
 #endif /* ANDROID_P2P */
 #ifdef ANDROID
+#ifndef ANDROID_LIB_STUB
 	.driver_cmd = wpa_driver_nl80211_driver_cmd,
+#endif /* !ANDROID_LIB_STUB */
 #endif /* ANDROID */
 	.vendor_cmd = nl80211_vendor_cmd,
 	.set_qos_map = nl80211_set_qos_map,
-- 
2.4.3.573.g4eafbef




More information about the Hostap mailing list