[PATCH] FreeBSD: Fix driver_bsd.c build

Masashi Honma honma
Fri Jan 8 01:54:50 PST 2010


On FreeBSD 8.0, driver_bsd.c build fails because of changes from
older version FreeBSD. The error messages are below.

In file included from ../src/drivers/driver_bsd.c:38:
/usr/include/net80211/ieee80211_crypto.h:94: error: 'IEEE80211_TID_SIZE' undeclared here (not in a function)
../src/drivers/driver_bsd.c: In function 'wpa_driver_bsd_set_wpa_ie':
../src/drivers/driver_bsd.c:968: error: 'IEEE80211_IOC_OPTIE' undeclared (first use in this function)
../src/drivers/driver_bsd.c:968: error: (Each undeclared identifier is reported only once
../src/drivers/driver_bsd.c:968: error: for each function it appears in.)
gmake: *** [../src/drivers/driver_bsd.o] Error 1

This patch solves this issue.

diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index e4d42e8..bd3f56b 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -35,8 +35,8 @@
 #include <netproto/802_11/ieee80211_dragonfly.h>
 #else /* __DragonFly__ */
 #include <net80211/ieee80211.h>
-#include <net80211/ieee80211_crypto.h>
 #include <net80211/ieee80211_ioctl.h>
+#include <net80211/ieee80211_crypto.h>
 #endif /* __DragonFly__ */
 #if __FreeBSD__
 #include <net80211/ieee80211_freebsd.h>
@@ -965,7 +965,11 @@ static int
 wpa_driver_bsd_set_wpa_ie(struct wpa_driver_bsd_data *drv,
 	const u8 *wpa_ie, size_t wpa_ie_len)
+#ifdef IEEE80211_IOC_APPIE
+	return set80211var(drv, IEEE80211_IOC_APPIE, wpa_ie, wpa_ie_len);
+#else /* IEEE80211_IOC_APPIE */
 	return set80211var(drv, IEEE80211_IOC_OPTIE, wpa_ie, wpa_ie_len);
+#endif /* IEEE80211_IOC_APPIE */
 static int

Masashi Honma.

More information about the Hostap mailing list