-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add Trusty OS support #3942
Add Trusty OS support #3942
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @tgross35 (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Addressing a comment from the original PR, @JohnTitor asked:
Yeah, Trusty is not linux-like, nor is it a Unix. It has some overlap with those platforms, but isn't part of the same family of systems. I think the right thing to do is have Trusty be its own module. |
I think this would also be a good candidate for merging over to the 0.2 branch. The diff should apply cleanly, I've tested it against both branches. @rustbot label stable-nominated |
What should I do about the unknown [lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = [
'cfg(target_os, values("trusty"))',
] Is that appropriate to add in the PR as a temporary way to suppress the lint? Or is there a better way to handle this? |
f5ef2eb
to
1b6fc19
Compare
We should have that handled in Lines 24 to 36 in fbec928
Overall this looks pretty good to me, please just link to the relevant headers providing these definitions if possible. @rustbot author (just comment |
1b6fc19
to
ea1a045
Compare
@tgross35 We're using musl as our libc implementation, so those definitions come from the musl headers.
Also it looks like a rebase to the latest |
oh I forgot to say the magic word @rustbot review |
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.
Added the headers to the PR description so they make it into git history. Thanks!
Add Trusty OS support (backport <rust-lang#3942>) (cherry picked from commit 94c7cae)
…patch" Add Trusty OS support (backport <rust-lang#3942>) (cherry picked from commit 94c7cae)
This PR adds support for the Trusty secure operating system. This upstreams the patch that we have been using internally, cleaned up to meet the project's coding conventions.
This is a revival of #2987.
Relevant headers:
PROT_READ
,PROT_WRITE
, andMAP_FAILED
come frommman.h
.CLOCK_BOOTTIME
comes fromtime.h
.STDOUT_FILENO
andSTDERR_FILE_NO
come fromunistd.h
.AT_PAGESZ
comes fromelf.h
.