aboutsummaryrefslogtreecommitdiff
path: root/devel/electron17/files/patch-third__party_webrtc_modules_desktop__capture_linux_x__server__pixel__buffer.cc
blob: d1f954452fe0eef1268cd7cad501215f768a3b15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- third_party/webrtc/modules/desktop_capture/linux/x_server_pixel_buffer.cc.orig	2022-05-11 07:17:59 UTC
+++ third_party/webrtc/modules/desktop_capture/linux/x_server_pixel_buffer.cc
@@ -213,6 +213,13 @@ void XServerPixelBuffer::InitShm(const XWindowAttribut
   Visual* default_visual = attributes.visual;
   int default_depth = attributes.depth;
 
+#if defined(__OpenBSD__)
+  // pledge(2)
+  RTC_LOG(LS_WARNING) << "Unable to use shmget(2) while using pledge(2). "
+                         "Performance may be degraded.";
+  return;
+#endif
+
   int major, minor;
   Bool have_pixmaps;
   if (!XShmQueryVersion(display_, &major, &minor, &have_pixmaps)) {