mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
wpa_supplicant: fix FTBFS on Debian GNU/kFreeBSD
This patch allows wpa_supplicant to compile on Debian's kfreebsd architectures. Patch by Stefan Lippers-Hollmann based on work done by Petr Salinger and Emmanuel Bouthenot for 0.6.X (http://bugs.debian.org/480572).
This commit is contained in:
parent
d2f46a2b13
commit
09bd6e8cca
@ -35,11 +35,14 @@
|
||||
#include <netproto/802_11/ieee80211_ioctl.h>
|
||||
#include <netproto/802_11/ieee80211_dragonfly.h>
|
||||
#else /* __DragonFly__ */
|
||||
#ifdef __GLIBC__
|
||||
#include <netinet/ether.h>
|
||||
#endif /* __GLIBC__ */
|
||||
#include <net80211/ieee80211.h>
|
||||
#include <net80211/ieee80211_ioctl.h>
|
||||
#include <net80211/ieee80211_crypto.h>
|
||||
#endif /* __DragonFly__ */
|
||||
#if __FreeBSD__
|
||||
#endif /* __DragonFly__ || __GLIBC__ */
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#include <net80211/ieee80211_freebsd.h>
|
||||
#endif
|
||||
#if __NetBSD__
|
||||
|
@ -21,9 +21,9 @@
|
||||
#include <net/if_arp.h>
|
||||
#include <net/if.h>
|
||||
#endif /* __linux__ */
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
|
||||
#include <net/if_dl.h>
|
||||
#endif /* defined(__FreeBSD__) || defined(__DragonFly__) */
|
||||
#endif /* defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) */
|
||||
|
||||
#include "common.h"
|
||||
#include "eloop.h"
|
||||
@ -474,7 +474,7 @@ static int wpa_driver_wired_multi(const char *ifname, const u8 *addr, int add)
|
||||
ifr.ifr_hwaddr.sa_family = AF_UNSPEC;
|
||||
os_memcpy(ifr.ifr_hwaddr.sa_data, addr, ETH_ALEN);
|
||||
#endif /* __linux__ */
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
|
||||
{
|
||||
struct sockaddr_dl *dlp;
|
||||
dlp = (struct sockaddr_dl *) &ifr.ifr_addr;
|
||||
@ -486,7 +486,7 @@ static int wpa_driver_wired_multi(const char *ifname, const u8 *addr, int add)
|
||||
dlp->sdl_slen = 0;
|
||||
os_memcpy(LLADDR(dlp), addr, ETH_ALEN);
|
||||
}
|
||||
#endif /* defined(__FreeBSD__) || defined(__DragonFly__) */
|
||||
#endif /* defined(__FreeBSD__) || defined(__DragonFly__) || defined(FreeBSD_kernel__) */
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
|
||||
{
|
||||
struct sockaddr *sap;
|
||||
|
@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(__GLIBC__)
|
||||
#include <net/bpf.h>
|
||||
#endif /* __APPLE__ */
|
||||
#include <pcap.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "os.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__GLIBC__)
|
||||
#include <endian.h>
|
||||
#include <byteswap.h>
|
||||
#endif /* __linux__ */
|
||||
|
@ -797,7 +797,7 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#include <sys/sysctl.h>
|
||||
#include <net/route.h>
|
||||
#include <net/if_dl.h>
|
||||
@ -884,7 +884,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__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
if (eth_get(net_if, mac) < 0) {
|
||||
wpa_printf(MSG_ERROR, "WPS UPnP: Failed to get MAC address");
|
||||
goto fail;
|
||||
|
@ -346,7 +346,7 @@ wpa_supplicant_ctrl_iface_init(struct wpa_supplicant *wpa_s)
|
||||
}
|
||||
|
||||
os_memset(&addr, 0, sizeof(addr));
|
||||
#ifdef __FreeBSD__
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
addr.sun_len = sizeof(addr);
|
||||
#endif /* __FreeBSD__ */
|
||||
addr.sun_family = AF_UNIX;
|
||||
@ -645,7 +645,7 @@ wpa_supplicant_global_ctrl_iface_init(struct wpa_global *global)
|
||||
}
|
||||
|
||||
os_memset(&addr, 0, sizeof(addr));
|
||||
#ifdef __FreeBSD__
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
addr.sun_len = sizeof(addr);
|
||||
#endif /* __FreeBSD__ */
|
||||
addr.sun_family = AF_UNIX;
|
||||
|
Loading…
Reference in New Issue
Block a user