summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/moz-patch-stack/0053.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /third_party/libwebrtc/moz-patch-stack/0053.patch
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/moz-patch-stack/0053.patch')
-rw-r--r--third_party/libwebrtc/moz-patch-stack/0053.patch88
1 files changed, 88 insertions, 0 deletions
diff --git a/third_party/libwebrtc/moz-patch-stack/0053.patch b/third_party/libwebrtc/moz-patch-stack/0053.patch
new file mode 100644
index 0000000000..38f35ba6e0
--- /dev/null
+++ b/third_party/libwebrtc/moz-patch-stack/0053.patch
@@ -0,0 +1,88 @@
+From: Landry Breuil <landry@openbsd.org>
+Date: Wed, 22 Dec 2021 00:09:00 +0000
+Subject: Bug 1654448 - P2 - readd partial support for BSD to webrtc
+ build;r=mjf
+
+only OpenBSD/amd64 is supported for now
+
+Depends on D134432
+
+Differential Revision: https://phabricator.services.mozilla.com/D134433
+Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/0300b32b7de70fb8976dc82d7d3bb3adb9685857
+---
+ BUILD.gn | 3 +++
+ modules/video_capture/BUILD.gn | 2 +-
+ modules/video_capture/linux/device_info_v4l2.h | 2 ++
+ rtc_base/platform_thread_types.cc | 4 +++-
+ webrtc.gni | 2 +-
+ 5 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/BUILD.gn b/BUILD.gn
+index e514b4d6a7..9fd472f10b 100644
+--- a/BUILD.gn
++++ b/BUILD.gn
+@@ -221,6 +221,9 @@ config("common_inherited_config") {
+ if (is_linux || is_chromeos) {
+ defines += [ "WEBRTC_LINUX" ]
+ }
++ if (is_bsd) {
++ defines += [ "WEBRTC_BSD" ]
++ }
+ if (is_mac) {
+ defines += [ "WEBRTC_MAC" ]
+ }
+diff --git a/modules/video_capture/BUILD.gn b/modules/video_capture/BUILD.gn
+index d473dbb74c..8f89918359 100644
+--- a/modules/video_capture/BUILD.gn
++++ b/modules/video_capture/BUILD.gn
+@@ -71,7 +71,7 @@ if (!build_with_chromium || is_linux || is_chromeos) {
+ "video_capture_options.h",
+ ]
+
+- if (is_linux || is_chromeos) {
++ if (is_linux || is_bsd || is_chromeos) {
+ sources += [
+ "linux/device_info_linux.cc",
+ "linux/device_info_v4l2.cc",
+diff --git a/modules/video_capture/linux/device_info_v4l2.h b/modules/video_capture/linux/device_info_v4l2.h
+index e3c2395f49..119cb07ab8 100644
+--- a/modules/video_capture/linux/device_info_v4l2.h
++++ b/modules/video_capture/linux/device_info_v4l2.h
+@@ -16,7 +16,9 @@
+ #include "modules/video_capture/device_info_impl.h"
+
+ #include "rtc_base/platform_thread.h"
++#ifdef WEBRTC_LINUX
+ #include <sys/inotify.h>
++#endif
+
+ struct v4l2_capability;
+
+diff --git a/rtc_base/platform_thread_types.cc b/rtc_base/platform_thread_types.cc
+index d64ea689bb..c3c6955a7b 100644
+--- a/rtc_base/platform_thread_types.cc
++++ b/rtc_base/platform_thread_types.cc
+@@ -50,7 +50,9 @@ PlatformThreadId CurrentThreadId() {
+ return static_cast<PlatformThreadId>(pthread_self());
+ #else
+ // Default implementation for nacl and solaris.
+- return reinterpret_cast<PlatformThreadId>(pthread_self());
++ // WEBRTC_BSD: pthread_t is a pointer, so cannot be casted to pid_t
++ // (aka int32_t) on 64-bit archs. Required on OpenBSD.
++ return reinterpret_cast<long>(pthread_self());
+ #endif
+ #endif // defined(WEBRTC_POSIX)
+ }
+diff --git a/webrtc.gni b/webrtc.gni
+index 44eaa2db04..bacd158140 100644
+--- a/webrtc.gni
++++ b/webrtc.gni
+@@ -360,7 +360,7 @@ rtc_opus_dir = "//third_party/opus"
+
+ # Desktop capturer is supported only on Windows, OSX and Linux.
+ rtc_desktop_capture_supported =
+- (is_win && current_os != "winuwp") || is_mac ||
++ (is_win && current_os != "winuwp") || is_mac || is_bsd ||
+ ((is_linux || is_chromeos) && (rtc_use_x11_extensions || rtc_use_pipewire))
+
+ ###############################################################################