Bug 1103858 - Enable FreeBSD wifi scanner on DragonFly. r=ted, r=jdm
authorJan Beich <jbeich@vfemail.net>
Mon, 24 Nov 2014 00:10:00 -0500
changeset 219742 709aae3e233f6eaee97355fb09b22ab16ae1b4a2
parent 219741 4dabf09c2e196ad745573e250424b8b9dd421572
child 219743 d70b753290ccc269ac937ab1d6cfb5e447dfbdb1
push idunknown
push userunknown
push dateunknown
reviewersted, jdm
bugs1103858
milestone37.0a1
Bug 1103858 - Enable FreeBSD wifi scanner on DragonFly. r=ted, r=jdm
configure.in
netwerk/wifi/moz.build
netwerk/wifi/nsWifiScannerFreeBSD.cpp
--- a/configure.in
+++ b/configure.in
@@ -8308,17 +8308,17 @@ dnl option to disable necko's wifi scann
 dnl
 
 case "$OS_TARGET" in
   Android)
     if test -n "$gonkdir"; then
       NECKO_WIFI=1
     fi
     ;;
-  Darwin|FreeBSD|SunOS|WINNT)
+  Darwin|DragonFly|FreeBSD|SunOS|WINNT)
     NECKO_WIFI=1
     ;;
   Linux)
     NECKO_WIFI=1
     NECKO_WIFI_DBUS=1
     ;;
 esac
 
--- a/netwerk/wifi/moz.build
+++ b/netwerk/wifi/moz.build
@@ -30,17 +30,17 @@ FAIL_ON_WARNINGS = CONFIG['OS_ARCH'] != 
 
 if CONFIG['OS_ARCH'] == 'Darwin':
     UNIFIED_SOURCES += [
         'nsWifiScannerMac.cpp',
     ]
     UNIFIED_SOURCES += [
         'osx_corewlan.mm',
     ]
-elif CONFIG['OS_ARCH'] == 'FreeBSD':
+elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD'):
     UNIFIED_SOURCES += [
         'nsWifiScannerFreeBSD.cpp',
     ]
 elif CONFIG['OS_ARCH'] == 'WINNT':
     UNIFIED_SOURCES += [
         'nsWifiScannerWin.cpp',
         'win_wifiScanner.cpp',
         'win_wlanLibrary.cpp',
--- a/netwerk/wifi/nsWifiScannerFreeBSD.cpp
+++ b/netwerk/wifi/nsWifiScannerFreeBSD.cpp
@@ -8,17 +8,21 @@
 // and then check for those with an 802.11 media type and able to return
 // a list of stations. This is similar to ifconfig(8).
 
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <net/if.h>
 #include <net/if_media.h>
+#ifdef __DragonFly__
+#include <netproto/802_11/ieee80211_ioctl.h>
+#else
 #include <net80211/ieee80211_ioctl.h>
+#endif
 
 #include <ifaddrs.h>
 #include <string.h>
 #include <unistd.h>
 
 #include "nsWifiAccessPoint.h"
 
 using namespace mozilla;