-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 libstd on DragonFly #32687
Fix libstd on DragonFly #32687
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
libc::clock_gettime(clock as libc::c_ulong, &mut t.t) | ||
}).unwrap(); | ||
t | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the duplication here be reduced from the whole function to just perhaps a typedef?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either that or the now
here could take an argument of the appropriate type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we would export the type as clock_t
from libc, then we could just use it here. But I think in this case a typedef is just fine!
Following changes: * birthtime does not exist on DragonFly * errno: __dfly_error is no more. Use #[thread_local] static errno. * clock_gettime expects a c_ulong (use a type alias) These changes are required to build DragonFly snapshots again.
@aturon @alexcrichton I rebased and squashed into a single commit. for some unknown reason the travis build shows a failed state (it successfully ran the tests). |
…excrichton Fix libstd on DragonFly Following changes: * birthtime does not exist on DragonFly * errno: __dfly_error is no more. Use #[thread_local] static errno. * clock_gettime expects a c_ulong These changes are required to build DragonFly snapshots again.
Following changes:
These changes are required to build DragonFly snapshots again.