patch 9.1.1595: Wayland: non-portable use of select()

Commit: 
https://github.com/vim/vim/commit/bb99474ceb63edf49d0bbf860d0f3d8a2cd15820
Author: Foxe Chen <chen.f...@gmail.com>
Date:   Wed Aug 6 20:38:33 2025 +0200

    patch 9.1.1595: Wayland: non-portable use of select()
    
    Problem:  Wayland: non-portable use of select()
    Solution: Correctly set the timeval struct
              (Foxe Chen)
    
    closes: #17886
    
    Signed-off-by: Foxe Chen <chen.f...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/version.c b/src/version.c
index 307b35841..275d28ce4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1595,
 /**/
     1594,
 /**/
diff --git a/src/wayland.c b/src/wayland.c
index b09ec5f6b..e1eee1994 100644
--- a/src/wayland.c
+++ b/src/wayland.c
@@ -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)

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1ujj8K-00GT9d-6G%40256bit.org.

Raspunde prin e-mail lui