Commit 91b0be0c 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 1f21917e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -5,11 +5,11 @@
#ifndef DOM_MEDIA_WEBRTC_LIBWEBRTCOVERRIDES_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_TYPES_H_
#define DOM_MEDIA_WEBRTC_LIBWEBRTCOVERRIDES_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_TYPES_H_

// pid_t
#if !defined(XP_WIN) || defined(__MINGW32__)
#if defined(XP_WIN) && \
    !defined(__MINGW32__)  // Moving this into the global namespace
typedef int pid_t;         // matching what used to be in
#elif defined(XP_WIN)      // video_capture_defines.h
#  include <sys/types.h>
#else
typedef int pid_t;
#endif

#include "../../third_party/libwebrtc/modules/desktop_capture/desktop_capture_types.h"
+2 −2
Original line number Diff line number Diff line
@@ -102,8 +102,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
@@ -6,6 +6,7 @@

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

#include "SdpAttribute.h"
#include "mozilla/Assertions.h"
+4 −4
Original line number Diff line number Diff line
@@ -27,8 +27,8 @@ NrIceStunAddr::NrIceStunAddr(const nr_local_addr* addr)
      fqdn_(addr->addr.fqdn),
      is_proxied_(addr->addr.is_proxied),
      tls_(addr->addr.tls),
      interface_type_(static_cast<InterfaceType>(addr->interface.type)),
      estimated_speed_(addr->interface.estimated_speed),
      interface_type_(static_cast<InterfaceType>(addr->iface.type)),
      estimated_speed_(addr->iface.estimated_speed),
      temporary_((addr->flags & NR_ADDR_FLAG_TEMPORARY) != 0) {}

NrIceStunAddr::Protocol NrIceStunAddr::protocolFromNrTransportAddr(
@@ -101,8 +101,8 @@ void NrIceStunAddr::toNrLocalAddr(nr_local_addr& addr) const {
  // generate as_string
  nr_transport_addr_fmt_addr_string(&addr.addr);

  addr.interface.type = static_cast<int>(interface_type_);
  addr.interface.estimated_speed = estimated_speed_;
  addr.iface.type = static_cast<int>(interface_type_);
  addr.iface.estimated_speed = estimated_speed_;

  if (temporary_) {
    addr.flags |= NR_ADDR_FLAG_TEMPORARY;
+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;
  }
Loading