aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-09-19 09:59:09 (GMT)
committerJouni Malinen <j@w1.fi>2019-09-21 10:38:32 (GMT)
commit7846e8d6086bbbbf549a21fd505847e169d2f303 (patch)
tree5ed6167c1be5b0f3c1a76126eb83f9e20115cba6
parentd0d303ae91b0acefe3d09f2395ca3c1a062333ea (diff)
downloadhostap-7846e8d6086bbbbf549a21fd505847e169d2f303.zip
hostap-7846e8d6086bbbbf549a21fd505847e169d2f303.tar.gz
hostap-7846e8d6086bbbbf549a21fd505847e169d2f303.tar.bz2
NetBSD: Fix compile
On NetBSD the ethernet header is net/if_ether.h This also pulls in net/if.h which defines if_type, which in turn conflicts with an enum in wpa_supplicant. As such we need to include this at the bottom rather than at the top. Signed-off-by: Roy Marples <roy@marples.name>
-rw-r--r--wpa_supplicant/ctrl_iface.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 6ed6837..65d0271 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -11,9 +11,6 @@
#include <netinet/ip.h>
#endif /* CONFIG_TESTING_OPTIONS */
-#if !defined(__CYGWIN__) && !defined(CONFIG_NATIVE_WINDOWS)
-#include <net/ethernet.h>
-#endif
#include "utils/common.h"
#include "utils/eloop.h"
#include "utils/uuid.h"
@@ -60,6 +57,12 @@
#include "dpp_supplicant.h"
#include "sme.h"
+#ifdef __NetBSD__
+#include <net/if_ether.h>
+#elif !defined(__CYGWIN__) && !defined(CONFIG_NATIVE_WINDOWS)
+#include <net/ethernet.h>
+#endif
+
static int wpa_supplicant_global_iface_list(struct wpa_global *global,
char *buf, int len);
static int wpa_supplicant_global_iface_interfaces(struct wpa_global *global,