summaryrefslogtreecommitdiff
path: root/xserver/glamor
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2018-08-06 20:14:05 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2018-08-06 20:14:05 +0000
commita37ad263a40948675a1a86aebfd1ab80db57c41d (patch)
treebb22adc7f187bbcf1cc263723f043029eb9195f4 /xserver/glamor
parentb5c8e356a44e75a249ec39ca5203bf32a3d13799 (diff)
Use priv_open_device() to open the dri device in glamor_dri3_open_client().
Fixes DRI3 with Xserver running as _x11 with xenodm. close-on-exec is now default for priv_open_device(). ok kettenis@
Diffstat (limited to 'xserver/glamor')
-rw-r--r--xserver/glamor/glamor_egl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xserver/glamor/glamor_egl.c b/xserver/glamor/glamor_egl.c
index 4bde637a0..c9955e89b 100644
--- a/xserver/glamor/glamor_egl.c
+++ b/xserver/glamor/glamor_egl.c
@@ -604,7 +604,11 @@ glamor_dri3_open_client(ClientPtr client,
int fd;
drm_magic_t magic;
+#ifndef __OpenBSD__
fd = open(glamor_egl->device_path, O_RDWR|O_CLOEXEC);
+#else
+ fd = priv_open_device(glamor_egl->device_path);
+#endif
if (fd < 0)
return BadAlloc;