From: Jouni Malinen Date: Tue, 9 Jun 2020 09:48:13 +0000 (+0300) Subject: WPS UPnP: Support build on OS X X-Git-Tag: hostap_2_10~1168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e80aeae4a021443c35ae03be082128f1f644b73;p=thirdparty%2Fhostap.git WPS UPnP: Support build on OS X Define MAC address fetching for OS X (by reusing the existing FreeBSD implementation) to allow full compile testing of the WPS implementation on a more BSD-like platform. Signed-off-by: Jouni Malinen --- diff --git a/src/wps/wps_upnp.c b/src/wps/wps_upnp.c index 16fefc77b..ff58cb938 100644 --- a/src/wps/wps_upnp.c +++ b/src/wps/wps_upnp.c @@ -862,7 +862,7 @@ fail: } -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) #include #include #include @@ -903,7 +903,7 @@ static int eth_get(const char *device, u8 ea[ETH_ALEN]) } return 0; } -#endif /* __FreeBSD__ */ +#endif /* __FreeBSD__ || __APPLE__ */ /** @@ -963,7 +963,7 @@ int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text, goto fail; } os_memcpy(mac, req.ifr_addr.sa_data, 6); -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) if (eth_get(net_if, mac) < 0) { wpa_printf(MSG_ERROR, "WPS UPnP: Failed to get MAC address"); goto fail;