diff mbox series

NetBSD: Fix compile

Message ID 5ef5ec81-118b-446d-09fc-a5e1b640cd75@marples.name
State Accepted
Headers show
Series NetBSD: Fix compile | expand

Commit Message

Roy Marples Sept. 19, 2019, 9:59 a.m. UTC
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>

Hostap@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/hostap

Comments

Jouni Malinen Sept. 21, 2019, 12:47 p.m. UTC | #1
On Thu, Sep 19, 2019 at 10:59:09AM +0100, Roy Marples wrote:
>     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.

Thanks, applied.
diff mbox series

Patch

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 6ed6837b3..65d027153 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
+

_______________________________________________
Hostap mailing list