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
[SR-685] Can't use arc4random on Linux #43300
Comments
Comment by Trent Nadeau (JIRA) There is no arc4random function in glibc. That function only exists in BSD distros and the Bionic libc used in Android. |
Comment by Michael Thomas (JIRA) I created a modulemap of libbsd to get arc4random on Linux, see here. |
Comment by Jay Buffington (JIRA)
|
Comment by Johannes Schriewer (JIRA) It may look absurd, but this actually works:
When there is a module map file for libbsd with these contents:
|
Please, never apply Jay Buffington workaround, as it would mislead people on Linux and potentially create threats. |
What should happen to this bug since SE-0202 (in Swift 4.2) encourages the new `Int.random(in: Range)` etc. instead? |
I vote to close wontfix, as I don't need it in 4.2. Feel free to speak up if you still do |
I think that's correct. We also now have the SwiftPM module map packages, in case someone wants to use Johannes' solution. |
Resolving because both the reporter (@drewcrawford) and @belkadan commented that it is "resolved" as "Won't Fix". |
Environment
swift-DEVELOPMENT-SNAPSHOT-2016-02-03
Linux x64
Additional Detail from JIRA
md5: 69637c9b621111a39912702a44128d6d
Issue Description:
I'm not aware of any workaround for this issue.
The text was updated successfully, but these errors were encountered: