Added option FBSD_NO_80211 to not include 802.11 spesific code on FreeBSD
authorAndreas Tonnesen <andreto@olsr.org>
Wed, 22 Jun 2005 20:04:35 +0000 (20:04 +0000)
committerAndreas Tonnesen <andreto@olsr.org>
Wed, 22 Jun 2005 20:04:35 +0000 (20:04 +0000)
make/Makefile.fbsd
src/bsd/net.c

index 3966e0f..7fae319 100644 (file)
@@ -16,6 +16,10 @@ LIBS =
 
 CFLAGS +=      -DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\"
 
+ifdef NO_80211
+CFLAGS += -DFBSD_NO_80211=1
+endif
+
 ifdef LIBNET
 
 CFLAGS +=      -DSPOOF -I$(INSTALL_PREFIX)/include
index 4017302..b0df700 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: net.c,v 1.24 2005/05/30 14:08:57 kattemat Exp $
+ * $Id: net.c,v 1.25 2005/06/22 20:04:35 kattemat Exp $
  */
 
 #include "defs.h"
 #ifdef __FreeBSD__
 #include <net/if_var.h>
 #include <net/ethernet.h>
+#ifndef FBSD_NO_80211
 #include <net80211/ieee80211.h>
 #include <net80211/ieee80211_ioctl.h>
 #include <dev/wi/if_wavelan_ieee.h>
 #include <dev/wi/if_wireg.h>
 #endif
+#endif
 
 #ifdef SPOOF
 #include <net/if_dl.h>
@@ -706,7 +708,7 @@ olsr_select(int nfds,
 int 
 check_wireless_interface(char *ifname)
 {
-#ifdef __FreeBSD__
+#if defined __FreeBSD__ &&  !defined FBSD_NO_80211
   struct wi_req        wreq;
   struct ifreq ifr;