Commit 7cc171c4 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 e70e577b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -105,8 +105,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
@@ -8,6 +8,7 @@

#include <limits>
#include <ostream>
#include <string>

#include "SdpAttribute.h"
#include "mozilla/Assertions.h"
+3 −3
Original line number Diff line number Diff line
@@ -43,9 +43,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
@@ -115,7 +115,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
@@ -1960,8 +1960,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));
@@ -2899,8 +2899,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