Commit 7cd69037 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 adc51245
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"
+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
Loading