Fix hostapd and wpa_supplicant comipilation on NetBSD 4.0.1
authorMasashi Honma <honma@ictec.co.jp>
Thu, 21 May 2009 08:21:09 +0000 (11:21 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 21 May 2009 08:21:09 +0000 (11:21 +0300)
src/drivers/driver_bsd.c

index b6b6d8e..e171637 100644 (file)
 #else
 #include <net/ethernet.h>
 #endif
+#include <net/route.h>
 
 #include <net80211/ieee80211.h>
 #include <net80211/ieee80211_crypto.h>
 #include <net80211/ieee80211_ioctl.h>
+#if __FreeBSD__
+#include <net80211/ieee80211_freebsd.h>
+#endif
+#if __NetBSD__
+#include <net80211/ieee80211_netbsd.h>
+#endif
+
+#ifdef HOSTAPD
 
 /*
  * Avoid conflicts with hostapd definitions by undefining couple of defines
 #undef WPA_VERSION
 #undef WPA_OUI_TYPE
 
-
-#ifdef HOSTAPD
-
 #include "l2_packet/l2_packet.h"
 #include "../../hostapd/hostapd.h"
 #include "../../hostapd/config.h"
 #include "../../hostapd/eapol_sm.h"
+#include "../../hostapd/sta_flags.h"
 
 struct bsd_driver_data {
        struct hostapd_data *hapd;              /* back pointer */
@@ -541,9 +548,6 @@ no_ie:
        return hostapd_notif_assoc(hapd, addr, iebuf, ielen);
 }
 
-#include <net/route.h>
-#include <net80211/ieee80211_freebsd.h>
-
 static void
 bsd_wireless_event_receive(int sock, void *ctx, void *sock_ctx)
 {
@@ -1203,14 +1207,6 @@ wpa_driver_bsd_scan(void *priv, const u8 *ssid, size_t ssid_len)
        return set80211param(drv, IEEE80211_IOC_SCAN_REQ, 0);
 }
 
-#include <net/route.h>
-#if __FreeBSD__
-#include <net80211/ieee80211_freebsd.h>
-#endif
-#if __NetBSD__
-#include <net80211/ieee80211_netbsd.h>
-#endif
-
 static void
 wpa_driver_bsd_event_receive(int sock, void *ctx, void *sock_ctx)
 {