Fix compile error on older systems without clock_get* - #8256
Merged
Conversation
Member
|
What is your platform? |
Contributor
Author
|
Sorry, I wrote this patch months ago and it appears I've misread it. I've corrected the description - the issue is solely the I've found a bug report for it: https://bugs.ruby-lang.org/issues/19478. I happen to be using the same system (for old hardware), but it may affect other systems not updated for POSIX 2008 compliance. |
nobu
approved these changes
Aug 24, 2023
nobu
left a comment
Member
There was a problem hiding this comment.
Thank you for the explanation.
Makes sense.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clock_get* calls are already gated in ifdef conditionals here:
ruby/process.c
Lines 8377 to 8381 in 3c53d31
and here:
ruby/process.c
Lines 8556 to 8560 in 3c53d31
as are all other assignments of the variable
c.However declaration
clockid_t c;was not wrapped in an ifdef. Besides being an unused variable, systems that are withoutclock_get*are unlikely to haveclockid_t, resulting in a compile error. This pull request fixes that.This regressed in Ruby 3.2.