patch 9.1.1595: Wayland: non-portable use of select()
Commit:
https://github.com/vim/vim/commit/bb99474ceb63edf49d0bbf860d0f3d8a2cd15820
Author: Foxe Chen <
chen...@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...@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)