]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
NetBSD: Fix compile
authorRoy Marples <roy@marples.name>
Thu, 19 Sep 2019 09:59:09 +0000 (10:59 +0100)
committerJouni Malinen <j@w1.fi>
Sat, 21 Sep 2019 10:38:32 +0000 (13:38 +0300)
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>
wpa_supplicant/ctrl_iface.c

index 6ed6837b37eb8c6be5d55d7945d2d27ab2500fb0..65d0271530ad0d3a80f0ff73d3f50e24f714f006 100644 (file)
@@ -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"
 #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,