[bug#78052] gnu: ungoogled-chromium: Fix WebRTC.
Commit Message
* gnu/packages/patches/ungoogled-chromium-fcntl-fix.patch: New file.
* gnu/packages/chromium.scm (%guix-patches): Add reference to it.
* gnu/local.mk (dist_patch_DATA): Add reference to it.
Change-Id: I91b7c3243345f6f1eda71aa4ec68faf3ef4a98f4
---
gnu/local.mk | 1 +
gnu/packages/chromium.scm | 3 ++
.../ungoogled-chromium-fcntl-fix.patch | 28 +++++++++++++++++++
3 files changed, 32 insertions(+)
create mode 100644 gnu/packages/patches/ungoogled-chromium-fcntl-fix.patch
base-commit: a36ff7d51110403295a359e7f40c3eb42ccfd509
@@ -2344,6 +2344,7 @@ dist_patch_DATA = \
%D%/packages/patches/uftrace-fix-tests.patch \
%D%/packages/patches/ultrastar-deluxe-no-freesans.patch \
%D%/packages/patches/ungoogled-chromium-extension-search-path.patch \
+ %D%/packages/patches/ungoogled-chromium-fcntl-fix.patch \
%D%/packages/patches/ungoogled-chromium-ffmpeg-compat.patch \
%D%/packages/patches/ungoogled-chromium-RUNPATH.patch \
%D%/packages/patches/ungoogled-chromium-system-ffmpeg.patch \
@@ -385,6 +385,9 @@ (define %guix-patches
(list (local-file
(assume-valid-file-name
(search-patch "ungoogled-chromium-extension-search-path.patch")))
+ (local-file
+ (assume-valid-file-name
+ (search-patch "ungoogled-chromium-fcntl-fix.patch")))
(local-file
(assume-valid-file-name
(search-patch "ungoogled-chromium-RUNPATH.patch")))
new file mode 100644
@@ -0,0 +1,28 @@
+From 7b0d7f48fbffb412f0c485f86ef33b0dea605d1d Mon Sep 17 00:00:00 2001
+From: Jan Grulich <grulja@gmail.com>
+Date: Fri, 12 May 2023 20:59:06 +0200
+Subject: [PATCH] PipeWire capturer: fix fcntl call when duplicating a file descriptor
+
+The fcntl() call has variable arguments, therefore we need to pass 0 to
+specify there are no other arguments for this call, otherwise we might
+end up with an argument that is random garbage.
+
+Bug: webrtc:15174
+Change-Id: I34f16a942d80913b667d8ade7eed557b0233be01
+Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305120
+Reviewed-by: Alexander Cooper <alcooper@chromium.org>
+Commit-Queue: Jan Grulich <grulja@gmail.com>
+Cr-Commit-Position: refs/heads/main@{#40060}
+---
+
+--- ./third_party/webrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc.orig 2024-11-18 21:48:23.280303055 +0100
++++ ./third_party/webrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc 2024-11-18 21:48:24.860287444 +0100
+@@ -447,7 +447,7 @@
+
+ if (fd >= 0) {
+ pw_core_ = pw_context_connect_fd(
+- pw_context_, fcntl(fd, F_DUPFD_CLOEXEC), nullptr, 0);
++ pw_context_, fcntl(fd, F_DUPFD_CLOEXEC, 0), nullptr, 0);
+ } else {
+ pw_core_ = pw_context_connect(pw_context_, nullptr, 0);
+ }