[PATCH] Compilation fails on NetBSD

Masashi Honma honma at ictec.co.jp
Wed Apr 29 05:06:29 EDT 2009


Hello.

The compilation of hostapd and wpa_supplicant both fails
on NetBSD 4.0.1.
This patch will solve it.

diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index b6b6d8e..e171637 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -29,10 +29,19 @@
 #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
@@ -42,13 +51,11 @@
 #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)
 {


Regards,
Masashi Honma.


More information about the HostAP mailing list