Commit 1a0ef180 authored by Marco Simonelli's avatar Marco Simonelli Committed by Pier Angelo Vendrame
Browse files

BB 41459: WebRTC fails to build under mingw (Part 5)

- fixes required to build dom/media/webrtc
parent 030e30ca
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -104,8 +104,8 @@
#endif

// for ntohs
#ifdef _MSC_VER
#  include "Winsock2.h"
#ifdef WIN32
#  include "winsock2.h"
#else
#  include <netinet/in.h>
#endif
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
 * 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/. */

#include <string>
#include "SdpAttribute.h"
#include "nsCRT.h"

+3 −3
Original line number Diff line number Diff line
@@ -41,9 +41,9 @@ class LocalAddress {
    }
    addr_ = buf;

    is_vpn_ = (local_addr.interface.type & NR_INTERFACE_TYPE_VPN) != 0 ? 1 : 0;
    estimated_speed_ = local_addr.interface.estimated_speed;
    type_preference_ = GetNetworkTypePreference(local_addr.interface.type);
    is_vpn_ = (local_addr.iface.type & NR_INTERFACE_TYPE_VPN) != 0 ? 1 : 0;
    estimated_speed_ = local_addr.iface.estimated_speed;
    type_preference_ = GetNetworkTypePreference(local_addr.iface.type);
    ip_version_ = local_addr.addr.ip_version;
    return true;
  }
+2 −1
Original line number Diff line number Diff line
@@ -114,7 +114,8 @@
#    define WIN32_LEAN_AND_MEAN
#  endif
#  include "rtc_base/win32.h"
#elif defined(__GNUG__) || defined(SIGSLOT_USE_POSIX_THREADS)
#elif (defined(__GNUG__) || defined(SIGSLOT_USE_POSIX_THREADS)) && \
    !defined(__MINGW32__)
#  define _SIGSLOT_HAS_POSIX_THREADS
#  include <pthread.h>
#else
+4 −4
Original line number Diff line number Diff line
@@ -1964,8 +1964,8 @@ class WebRtcIcePrioritizerTest : public StunTest {
    std::string str_addr = "10.0.0." + num;
    std::string ifname = "eth" + num;
    nr_local_addr local_addr;
    local_addr.interface.type = type;
    local_addr.interface.estimated_speed = estimated_speed;
    local_addr.iface.type = type;
    local_addr.iface.estimated_speed = estimated_speed;

    int r = nr_str_port_to_transport_addr(str_addr.c_str(), 0, IPPROTO_UDP,
                                          &(local_addr.addr));
@@ -2902,8 +2902,8 @@ TEST_F(WebRtcIceConnectTest,

  // prepare a fake wifi interface
  nr_local_addr wifi_addr;
  wifi_addr.interface.type = NR_INTERFACE_TYPE_WIFI;
  wifi_addr.interface.estimated_speed = 1000;
  wifi_addr.iface.type = NR_INTERFACE_TYPE_WIFI;
  wifi_addr.iface.estimated_speed = 1000;

  int r = nr_str_port_to_transport_addr(FAKE_WIFI_ADDR, 0, IPPROTO_UDP,
                                        &(wifi_addr.addr));
Loading