-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
std::rand: adding solaris/illumos for getrandom support. #124766
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
Cc @josephlr who just filed rust-random/getrandom#417 |
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.
Line 62 also needs to be updated to include illumos/solaris so that there's a definition of getrandom
.
Otherwise, the implementation looks good. For the uses in libstd (generating random hashmap seeds), using getrandom
with flags = 0
is definitely the right call (on both illumos and Solaris). You also don't have to worry about maximum buffer size issues on Solaris as you will only be requesting 16 bytes at a time.
c16a770
to
b512ecf
Compare
Maybe there should be a comment explaining that. It seems confusing that this would use a different function than the getrandom crate. |
This helps with rust-lang/miri#3567. (@devnexen when you open a PR that is related to some issue, please mention the issue in the PR description. That helps give context to the reviewer, and to whoever is looking at the issue it helps determine the current status. Generally, PRs should almost always have a description that explains what is done and why.) |
b512ecf
to
1d45f47
Compare
To help solarish support for miri https://rust-lang/miri/issues/3567
@bors r+ rollup |
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#124766 (std::rand: adding solaris/illumos for getrandom support.) - rust-lang#124818 (Update ena to 0.14.3) - rust-lang#124991 (Fix typo in ManuallyDrop's documentation) - rust-lang#124994 (Add `@saethlin` to some triagebot groups) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124766 - devnexen:getrandom_solarish, r=Mark-Simulacrum std::rand: adding solaris/illumos for getrandom support. To help solarish support for miri https://rust-lang/miri#3567
To help solarish support for miri https://https://github.com/rust-lang/miri/issues/3567