Skip to content

Make libc dependency optional#928

Merged
dhardy merged 3 commits intorust-random:masterfrom
dhardy:libc
Jan 8, 2020
Merged

Make libc dependency optional#928
dhardy merged 3 commits intorust-random:masterfrom
dhardy:libc

Conversation

@dhardy
Copy link
Member

@dhardy dhardy commented Jan 8, 2020

Fixes #911 and #927.

(Although the plan is still to restrict ReseedingRng to std for 0.8.)

Review please @Amanieu / @BurtonQin / @bjorn3 (and apologies for the delay).

Copy link
Contributor

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why I have been pinged for review.


#[cfg(all(unix, not(target_os = "emscripten")))]
#[cfg(all(unix, feature = "std", not(target_os = "emscripten")))]
mod fork {
Copy link
Contributor

@bjorn3 bjorn3 Jan 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires libc and not std, right?

Edit: missed that you switched to Once.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once requires std. std implies libc in the Cargo.toml

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was a separate commit, so may be confusing.

@dhardy
Copy link
Member Author

dhardy commented Jan 8, 2020

Not sure why I have been pinged for review.

Because you commented on #927 and it's sometimes difficult getting reviews done around here.

@Amanieu
Copy link
Contributor

Amanieu commented Jan 8, 2020

LGTM

@dhardy dhardy merged commit 5b0d874 into rust-random:master Jan 8, 2020
@Amanieu
Copy link
Contributor

Amanieu commented Jan 8, 2020

Can you publish a new release with this change?

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.

Possible atomicity violation in reseeding register_fork_handler

4 participants