portable icon indicating copy to clipboard operation
portable copied to clipboard

Attempt to fix 2038 problem with MSVC

Open botovq opened this issue 1 year ago • 3 comments

This might fix #1076

botovq avatar Aug 02 '24 20:08 botovq

You may want to wrap winsock select() as well to ensure that it will still see the timeval struct layout it expects.

datadiode avatar Aug 03 '24 06:08 datadiode

Tested on OpenSSH portable, and it fixes the issues on Win32 builds.

LainOTN2 avatar Aug 06 '24 09:08 LainOTN2

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.

botovq avatar Aug 06 '24 09:08 botovq

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 openssl s_client.

busterb avatar Oct 07 '24 00:10 busterb

Going to land this now

busterb avatar Oct 08 '24 03:10 busterb

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.

botovq avatar Oct 08 '24 07:10 botovq