aboutsummarylogtreecommitdiffstats
path: root/0001-set-O_NONBLOCK-on-repeat-timerfd.patch
blob: 3d24c220f741ef5f8bed188fc25a9e509baf01dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From f57907bf3bbce52fbf2c5ca10206ad2b660f6cda Mon Sep 17 00:00:00 2001
From: Stone Tickle <lattis@mochiro.moe>
Date: Fri, 5 Jun 2020 12:51:25 +0900
Subject: [PATCH 1/3] set O_NONBLOCK on repeat timerfd

---
 src/wl_init.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/wl_init.c b/src/wl_init.c
index 49e7cc52..7d90e6ee 100644
--- a/src/wl_init.c
+++ b/src/wl_init.c
@@ -1165,8 +1165,9 @@ int _glfwPlatformInit(void)
     _glfwInitTimerPOSIX();
 
     _glfw.wl.timerfd = -1;
-    if (_glfw.wl.seatVersion >= 4)
-        _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
+    if (_glfw.wl.seatVersion >= 4) {
+        _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
+    }
 
     if (_glfw.wl.pointer && _glfw.wl.shm)
     {
-- 
2.32.0