summaryrefslogtreecommitdiff
path: root/mail/thunderbird/files/patch-bug893397
diff options
context:
space:
mode:
authorBeat Gaetzi <beat@FreeBSD.org>2014-03-19 20:46:37 +0000
committerBeat Gaetzi <beat@FreeBSD.org>2014-03-19 20:46:37 +0000
commitc80e090095217ca31b70c2e08b6ce4f9e9c17aa3 (patch)
tree8328d62bf6a7445a78ee750e6a14a1c78a2b33ac /mail/thunderbird/files/patch-bug893397
parentFix build when cdparanoia option enabled. (diff)
- Update Firefox to 28.0
- Update Firefox ESR to 24.4.0 - Update Thunderbird to 24.4.0 - Update NSPR to 4.10.4 - Update NSS to 3.15.5 - Switch GSTREAMER option for non-esr ports to depend on multimedia/gstreamer1 [2] - Switch to Uses/compiler.mk, defaults to lang/gcc47 on 8.x and 9.x - Use port dependencies for libogg, libvorbis, libopus, harfbuzz, graphite2 - Enable readahead in url-classifier, asmjs, download resume like on Linux - Build www/firefox and www/seamonkey faster using unified compilation - Unbreak build on sparc64 [1] - Workaround OPTIMIZED_CFLAGS startup crash on 8.x and 9.x - OPTIMIZED_CFLAGS is enabled by default - A few DEBUG build fixes - Add clang 3.2/3.3/3.4 workarounds for i386 - Mention known GSTREAMER issue in pkg-message Submitted by: Jan Beich PR: ports/186580 [1] Requested by: kwm [2] Security: http://www.vuxml.org/freebsd/610de647-af8d-11e3-a25b-b4b52fce4ce8.html
Notes
Notes: svn path=/head/; revision=348650
Diffstat (limited to 'mail/thunderbird/files/patch-bug893397')
-rw-r--r--mail/thunderbird/files/patch-bug89339777
1 files changed, 36 insertions, 41 deletions
diff --git a/mail/thunderbird/files/patch-bug893397 b/mail/thunderbird/files/patch-bug893397
index 091d15fb41e5..16013eba0445 100644
--- a/mail/thunderbird/files/patch-bug893397
+++ b/mail/thunderbird/files/patch-bug893397
@@ -2,7 +2,7 @@ diff --git configure.in configure.in
index 549ad06..2878d9f 100644
--- mozilla/configure.in
+++ mozilla/configure.in
-@@ -8491,7 +8491,7 @@ case "$OS_TARGET" in
+@@ -8091,7 +8091,7 @@ case "$OS_TARGET" in
NECKO_WIFI=1
fi
;;
@@ -15,9 +15,9 @@ diff --git netwerk/wifi/moz.build netwerk/wifi/moz.build
index 07b01de..11706af 100644
--- mozilla/netwerk/wifi/moz.build
+++ mozilla/netwerk/wifi/moz.build
-@@ -34,6 +34,10 @@ if CONFIG['OS_ARCH'] == 'Darwin':
- CMMSRCS += [
- 'osx_corewlan.mm',
+@@ -31,6 +31,10 @@ if CONFIG['OS_ARCH'] == 'Darwin':
+ CPP_SOURCES += [
+ 'nsWifiScannerMac.cpp',
]
+elif CONFIG['OS_ARCH'] == 'FreeBSD':
+ CPP_SOURCES += [
@@ -31,7 +31,7 @@ new file mode 100644
index 0000000..80d4cb6
--- /dev/null
+++ mozilla/netwerk/wifi/nsWifiScannerFreeBSD.cpp
-@@ -0,0 +1,172 @@
+@@ -0,0 +1,167 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -60,43 +60,39 @@ index 0000000..80d4cb6
+static nsresult
+FreeBSDGetAccessPointData(nsCOMArray<nsWifiAccessPoint> &accessPoints)
+{
-+ bool res = false;
-+ char *dupn = NULL;
-+ struct ifaddrs *ifal, *ifa;
-+ unsigned len;
-+
+ // get list of interfaces
-+ if (getifaddrs(&ifal) < 0)
++ struct ifaddrs *ifal;
++ if (getifaddrs(&ifal) < 0) {
+ return NS_ERROR_FAILURE;
++ }
+
+ accessPoints.Clear();
+
+ // loop through the interfaces
++ nsresult rv = NS_ERROR_FAILURE;
++ struct ifaddrs *ifa;
+ for (ifa = ifal; ifa; ifa = ifa->ifa_next) {
-+ int s;
-+ struct ifreq ifr;
-+ struct ifmediareq ifmr;
-+ struct ieee80211req i802r;
-+ char iscanbuf[32*1024], *vsr;
-+
-+ memset(&ifr, 0, sizeof(ifr));
-+
-+ // list can contain duplicates, so ignore those
-+ if (dupn != NULL && strcmp(dupn, ifa->ifa_name) == 0)
++ // limit to one interface per address
++ if (ifa->ifa_addr->sa_family != AF_LINK) {
+ continue;
-+ dupn = ifa->ifa_name;
++ }
+
+ // store interface name in socket structure
++ struct ifreq ifr;
++ memset(&ifr, 0, sizeof(ifr));
+ strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
+ ifr.ifr_addr.sa_family = AF_LOCAL;
+
+ // open socket to interface
-+ if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0)
++ int s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0);
++ if (s < 0) {
+ continue;
++ }
+
+ // clear interface media structure
-+ (void) memset(&ifmr, 0, sizeof(ifmr));
-+ (void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
++ struct ifmediareq ifmr;
++ memset(&ifmr, 0, sizeof(ifmr));
++ strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
+
+ // get interface media information
+ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
@@ -111,8 +107,10 @@ index 0000000..80d4cb6
+ }
+
+ // perform WiFi scan
-+ (void) memset(&i802r, 0, sizeof(i802r));
-+ (void) strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
++ struct ieee80211req i802r;
++ char iscanbuf[32*1024];
++ memset(&i802r, 0, sizeof(i802r));
++ strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
+ i802r.i_type = IEEE80211_IOC_SCAN_RESULTS;
+ i802r.i_data = iscanbuf;
+ i802r.i_len = sizeof(iscanbuf);
@@ -125,36 +123,33 @@ index 0000000..80d4cb6
+ close(s);
+
+ // loop through WiFi networks and build geoloc-lookup structure
-+ vsr = (char *) i802r.i_data;
-+ len = i802r.i_len;
++ char *vsr = (char *) i802r.i_data;
++ unsigned len = i802r.i_len;
+ while (len >= sizeof(struct ieee80211req_scan_result)) {
-+ struct ieee80211req_scan_result *isr;
-+ char *id;
-+ int idlen;
-+ char ssid[IEEE80211_NWID_LEN+1];
-+ nsWifiAccessPoint *ap;
-+
-+ isr = (struct ieee80211req_scan_result *) vsr;
++ struct ieee80211req_scan_result *isr =
++ (struct ieee80211req_scan_result *) vsr;
+
+ // determine size of this entry
++ char *id;
++ int idlen;
+ if (isr->isr_meshid_len) {
+ id = vsr + isr->isr_ie_off + isr->isr_ssid_len;
+ idlen = isr->isr_meshid_len;
-+ }
-+ else {
++ } else {
+ id = vsr + isr->isr_ie_off;
+ idlen = isr->isr_ssid_len;
+ }
+
+ // copy network data
++ char ssid[IEEE80211_NWID_LEN+1];
+ strncpy(ssid, id, idlen);
+ ssid[idlen] = '\0';
-+ ap = new nsWifiAccessPoint();
++ nsWifiAccessPoint *ap = new nsWifiAccessPoint();
+ ap->setSSID(ssid, strlen(ssid));
+ ap->setMac(isr->isr_bssid);
+ ap->setSignal(isr->isr_rssi);
+ accessPoints.AppendObject(ap);
-+ res = true;
++ rv = NS_OK;
+
+ // log the data
+ LOG(( "FreeBSD access point: "
@@ -172,7 +167,7 @@ index 0000000..80d4cb6
+
+ freeifaddrs(ifal);
+
-+ return res ? NS_OK : NS_ERROR_FAILURE;
++ return rv;
+}
+
+nsresult