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

Linux: add reboot() and constants #333

Merged
merged 7 commits into from
Jul 12, 2016
Merged

Conversation

bugaevc
Copy link
Contributor

@bugaevc bugaevc commented Jul 12, 2016

Add declarations from sys/reboot.h and linux/reboot.h. Initially originated as nix-rust/nix#386.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Copy them into individual platform files instead. Fixes musl build.
@bugaevc
Copy link
Contributor Author

bugaevc commented Jul 12, 2016

Should the rest of reboot declarations be in notbsd/mod.rs, or should I copy the declarations to notbsd/android, or are they somehow included from notbsd/linux/mod.rs (doesn't seem to be the case, but there are lots of functions there and just several in notbsd/android)?

@alexcrichton
Copy link
Member

If they're shared among all the platforms under notbsd (Android + Linux) then it should be fine to place the definitions in notbsd/mod.rs, but copying is also fine. Looks like CI is green here so I'd be good merging, but do you wanna juggle around the declarations a bit?

@bugaevc
Copy link
Contributor Author

bugaevc commented Jul 12, 2016

I'm not really sure whether the same stuff is available under Android: Android is Linux anyway, but it may well be glibc-specific stuff.
Let me try to put them into notbsd and see if that breaks the Android build.

@bugaevc
Copy link
Contributor Author

bugaevc commented Jul 12, 2016

OK, so it does break the Android build. Reverting.

@bugaevc
Copy link
Contributor Author

bugaevc commented Jul 12, 2016

Feel free to merge this (or should we play the rebasing/squashing game?).

@alexcrichton
Copy link
Member

Nah this is fine, thanks again!

@alexcrichton alexcrichton merged commit 16f3a8e into rust-lang:master Jul 12, 2016
@bugaevc
Copy link
Contributor Author

bugaevc commented Jul 12, 2016

Thanks! When can I expect this to be released (e.g. to use it in nix)?

@alexcrichton
Copy link
Member

Would it be possible for nix to use a git version of libc for now? I can be sure to make a release right before a nix release, but we just made a release yesterday I believe for another nix-requested PR :)

@alexcrichton
Copy link
Member

That being said, I certainly don't mind making another release!

@bugaevc
Copy link
Contributor Author

bugaevc commented Jul 12, 2016

Filed nix-rust/nix#387 for nix to track libc's master

@alexcrichton
Copy link
Member

Thanks! I'll add some comments over there as well.

danielverkamp pushed a commit to danielverkamp/libc that referenced this pull request Apr 28, 2020
Looks like LLVM 6 may have removed the intrinsic, and this implementation is
modeled after clang's.
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

3 participants