Skip to content
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

Fix for Y2038 gettimeofday for Win32 builds #738

Merged
merged 3 commits into from
Mar 26, 2025

Conversation

LainOTN2
Copy link

@LainOTN2 LainOTN2 commented Aug 6, 2024

PR Summary
This is the second part of the fix for Y2038 issues, first part is on LibreSSL PowerShell/LibreSSL#30 , we need to override the definition of timeval from winsock2.h.

PR Context
OpenSSH uses gettimeofday from LibreSSL, OpenSSH and LibreSSL has been using the definition of winsock2.h https://learn.microsoft.com/en-us/windows/win32/api/winsock2/ns-winsock2-timeval that is signed integer, this made LibreSSL and OpenSSH prone to the Y2038 problem. As we modify the declaration of gettimeofday on LibreSSL we need to override the declaration of timeval in OpenSSH also to match the LibreSSL signature.
Note that if we made this change the version of LibreSSL with the fix has to be released at the same time or signatures will not match.

@tgauth
Copy link
Collaborator

tgauth commented Mar 26, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Collaborator

@tgauth tgauth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, @LainOTN2!

@tgauth tgauth merged commit 31f8d13 into PowerShell:latestw_all Mar 26, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants