]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1595: Wayland: non-portable use of select() v9.1.1595
authorFoxe Chen <chen.foxe@gmail.com>
Wed, 6 Aug 2025 18:38:33 +0000 (20:38 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 6 Aug 2025 18:38:33 +0000 (20:38 +0200)
Problem:  Wayland: non-portable use of select()
Solution: Correctly set the timeval struct
          (Foxe Chen)

closes: #17886

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/version.c
src/wayland.c

index 307b358416b72575c1333c4bd4402795ffe1fc96..275d28ce421481b934c4e2b38d94f1ee5ea07fd0 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1595,
 /**/
     1594,
 /**/
index b09ec5f6b9218e3a26c089172d7f4e6148d169f5..e1eee19940a3a3e931c2bdd819fc7939e0bcdfbc 100644 (file)
@@ -403,8 +403,8 @@ vwl_display_flush(vwl_display_T *display)
     FD_ZERO(&wfds);
     FD_SET(display->fd, &wfds);
 
-    tv.tv_sec  = 0;
-    tv.tv_usec = p_wtm * 1000;
+    tv.tv_sec  = p_wtm / 1000;
+    tv.tv_usec = (p_wtm % 1000) * 1000;
 #endif
 
     if (display->proxy == NULL)
@@ -518,8 +518,8 @@ vwl_display_dispatch(vwl_display_T *display)
     FD_ZERO(&rfds);
     FD_SET(display->fd, &rfds);
 
-    tv.tv_sec      = 0;
-    tv.tv_usec     = p_wtm * 1000;
+    tv.tv_sec      = p_wtm / 1000;
+    tv.tv_usec     = (p_wtm % 1000) * 1000;
 #endif
 
     if (display->proxy == NULL)