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

os.getrandom on freebsd should use the getrandom C function #2993

Closed
euantorano opened this issue Aug 2, 2019 · 2 comments · Fixed by #3013
Closed

os.getrandom on freebsd should use the getrandom C function #2993

euantorano opened this issue Aug 2, 2019 · 2 comments · Fixed by #3013
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. os-freebsd standard library This issue involves writing Zig code for the standard library.
Milestone

Comments

@euantorano
Copy link
Contributor

As of FreeBSD 12, FreeBSD now has a ssize_t getrandom(void *buf, size_t buflen, unsigned int flags); function that could be used by os.getrandom() in the same way that getrandom() is used on Linux.

@daurnimator daurnimator added os-freebsd standard library This issue involves writing Zig code for the standard library. labels Aug 2, 2019
@andrewrk andrewrk added this to the 0.6.0 milestone Aug 2, 2019
@andrewrk
Copy link
Member

andrewrk commented Aug 2, 2019

Since FreeBSD 12 is the minimum supported version, we can always use the libc version on FreeBSD. (The linux one has a libc version check)

@andrewrk andrewrk added the contributor friendly This issue is limited in scope and/or knowledge of Zig internals. label Aug 2, 2019
@euantorano
Copy link
Contributor Author

Awesome, that makes life easy. I'll see about creating a PR for this.

euantorano added a commit to euantorano/zig that referenced this issue Aug 5, 2019
andrewrk pushed a commit that referenced this issue Aug 5, 2019
@andrewrk andrewrk modified the milestones: 0.6.0, 0.5.0 Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. os-freebsd standard library This issue involves writing Zig code for the standard library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants