From c3a06e330b7e55e1daeefbb5c16a075c80233bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 18 May 2018 11:23:00 +0200 Subject: [PATCH] xfree86: Fix O_CLOEXEC usage in lnx_platform MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was passing O_CLOEXEC as permission bits instead of as a flag. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard (cherry picked from commit ab53e2859facecc0486344679dc01ea31fb427e9) --- hw/xfree86/os-support/linux/lnx_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c index 11af52c46..70374ace8 100644 --- a/hw/xfree86/os-support/linux/lnx_platform.c +++ b/hw/xfree86/os-support/linux/lnx_platform.c @@ -43,7 +43,7 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) } if (fd == -1) - fd = open(path, O_RDWR, O_CLOEXEC); + fd = open(path, O_RDWR | O_CLOEXEC, 0); if (fd == -1) return FALSE;