Source code
Revision control
Copy as Markdown
Other Tools
From: Michael Froman <mfroman@mozilla.com>
Date: Mon, 19 Jan 2026 13:10:00 -0600
Subject: Bug 2010312 - (fix-d167fe9296) fix linux builds for constexpr
containing std::string. r?ng!
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/ece87d91b514ab155e600e067b4a99601bddbffc
---
.../linux/wayland/shared_screencast_stream.cc | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
index 72f85e0432..0b4939b8d6 100644
--- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
+++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
@@ -78,12 +78,24 @@ constexpr int CursorMetaSize(int w, int h) {
w * h * kCursorBpp);
}
+#if defined(__GNUC__) && defined(WEBRTC_MOZILLA_BUILD)
+// Mozilla linux builds are using -std=gnu++20, which doesn't approve
+// of using std::string in a constexpr. PipewireVersion now contains
+// std::string as of libwebrtc commit d167fe9296.
+static const PipeWireVersion kDmaBufModifierMinVersion = {.major = 0,
+ .minor = 3,
+ .micro = 33};
+static const PipeWireVersion kDropSingleModifierMinVersion = {.major = 0,
+ .minor = 3,
+ .micro = 40};
+#else
constexpr PipeWireVersion kDmaBufModifierMinVersion = {.major = 0,
.minor = 3,
.micro = 33};
constexpr PipeWireVersion kDropSingleModifierMinVersion = {.major = 0,
.minor = 3,
.micro = 40};
+#endif
class SharedScreenCastStreamPrivate {
public: