-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to fix 2038 problem with MSVC #1078
Conversation
You may want to wrap winsock select() as well to ensure that it will still see the timeval struct layout it expects. |
Tested on OpenSSH portable, and it fixes the issues on Win32 builds. |
On Tue, Aug 06, 2024 at 02:18:34AM -0700, LainOTN2 wrote:
Tested on OpenSSH portable, and it fixes the issues on Win32 builds.
Many thanks for testing!
I'll see how to deal with select (thanks @datadiode!) and will get this
into mergeable shape for the next release.
|
Otherwise it sets looptime to -1, which was skipped by select() and caused 100% cpu busy looping.
This prevents the compatibility struct timeval definition in sys/time.h from potentially getting used with select() here. https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-select
I made a change to poll_win.c to ensure that we use the appropriate timeval definition with select with Windows. We were anyway, because sys/time.h isn't used in Windows' select definition, but still just in case. This also fixes an issue where select was given {0, 4294967296} when poll was given a timeout value of -1, which caused poll() to spin with no timeout internally, noticed while logging internal behavior with |
Going to land this now |
On Mon, Oct 07, 2024 at 08:22:28PM -0700, Brent Cook wrote:
Going to land this now
Thanks. Sorry, didn't get around to reviewing it yesterday. Looks good
to me.
|
This might fix #1076