From 1105dd0c6916493e6995c8e26172198c9d1da6c1 Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Sun, 10 Jan 2016 23:40:37 +0100 Subject: [PATCH] Build on FreeBSD 10.2. Not tested further. --- src/osdnet.c | 8 ++++---- src/osdnet.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/osdnet.c b/src/osdnet.c index 02dc2c1..39b7a75 100644 --- a/src/osdnet.c +++ b/src/osdnet.c @@ -440,7 +440,7 @@ osn_ifealookup(char *ifnam, /* Interface name */ { struct ifent *ife; - if (ife = osn_iflookup(ifnam)) { + if ((ife = osn_iflookup(ifnam))) { if (!ife->ife_gotea) { ife->ife_gotea = osn_ifeaget2(ifnam, ife->ife_ea); } @@ -460,7 +460,7 @@ osn_ifiplookup(char *ifnam, /* Interface name */ { struct ifent *ife; - if (ife = osn_iflookup(ifnam)) { + if ((ife = osn_iflookup(ifnam))) { if (ife->ife_gotip4) { char ipstr[OSN_IPSTRSIZ]; @@ -483,7 +483,7 @@ osn_ifnmlookup(char *ifnam, /* Interface name */ { struct ifent *ife; - if (ife = osn_iflookup(ifnam)) { + if ((ife = osn_iflookup(ifnam))) { if (ife->ife_gotip4) { char ipstr[OSN_IPSTRSIZ]; @@ -1506,7 +1506,7 @@ osn_pfwrite_pcap(struct pfdata *pfdata, const void *buf, size_t nbytes) struct tuntap_context { int my_tap; char saved_ifnam[IFNAM_LEN]; -#if KLH10_NET_BRIDGE && CENV_SYS_NETBSD +#if KLH10_NET_BRIDGE && (CENV_SYS_NETBSD || CENV_SYS_FREEBSD) struct ifreq br_ifr; struct ifreq tap_ifr; #endif diff --git a/src/osdnet.h b/src/osdnet.h index a8c01f6..efc7c7a 100644 --- a/src/osdnet.h +++ b/src/osdnet.h @@ -265,7 +265,7 @@ #define HAVE_GETIFADDRS 1 /* assume this for now */ #define HAVE_LIBPCAP 1 /* assume this for now */ -#define HAVE_LIBPCAP_SET_IMMEDIATE_MODE 1 +#define HAVE_LIBPCAP_SET_IMMEDIATE_MODE (!CENV_SYS_FREEBSD) #if HAVE_LIBPCAP # undef BPF_MAJOR_VERSION /* some stupid linux header defines this: