Parcourir la source

FreeBSD: Fix driver_bsd.c build

On FreeBSD 8.0, driver_bsd.c build fails because of changes from
older versions of 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.
Masashi Honma il y a 15 ans
Parent
commit
c610dba137
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      src/drivers/driver_bsd.c

+ 5 - 1
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