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

For Y2K38 on 32 bit systems time_t tv_sec can be long long #68

Merged
merged 1 commit into from
Feb 5, 2023
Merged

For Y2K38 on 32 bit systems time_t tv_sec can be long long #68

merged 1 commit into from
Feb 5, 2023

Conversation

robert-scheck
Copy link
Contributor

@robert-scheck robert-scheck commented Feb 5, 2023

This should hopefully properly fix what CodeQL analysis spotted in #67. However, please review carefully!

I am not a C programmer or expert, but from my understanding, time_t tv_sec can be up to long long, e.g. on OpenBSD to cover Y2K38 compatibility on 32 bit systems. At https://man.openbsd.org/clock_gettime.2#EXAMPLES, there is an example, which this pull request is inspired from.

See also: https://lists.samba.org/archive/samba-technical/2015-September/109355.html

@adulau
Copy link
Owner

adulau commented Feb 5, 2023

Hi @robert-scheck it indeed makes sense on modern system. I'll merge on current HEAD. Thanks a lot.

@adulau adulau merged commit 1d1db30 into adulau:master Feb 5, 2023
@adulau
Copy link
Owner

adulau commented Feb 5, 2023

That's a good idea especially to quickly spot anything wrong in new contribution. Thanks again!

@robert-scheck robert-scheck deleted the wrong-type branch February 5, 2023 12:21
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.

None yet

2 participants