Signed-off-by: Jeremy Huddleston Sequoia <[email protected]>
---
Xext/shm.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Xext/shm.c b/Xext/shm.c
index 125000f..7a45dbd 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -1202,7 +1202,11 @@ shm_tmpfile(void)
int flags;
char template[] = SHMDIR "/shmfd-XXXXXX";
#ifdef O_TMPFILE
- fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666);
+ flags = O_TMPFILE|O_RDWR|O_EXCL;
+#ifdef O_CLOEXEC
+ flags |= O_CLOEXEC;
+#endif
+ fd = open(SHMDIR, flags, 0666);
if (fd >= 0) {
ErrorF ("Using O_TMPFILE\n");
return fd;
--
2.10.0 (Apple Git-99)
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel