about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authornia <nia@NetBSD.org>2019-11-04 17:16:11 +0000
committernia <nia@NetBSD.org>2019-11-04 17:16:11 +0000
commit23d221153f3d453166a765010f0029369e77b508 (patch)
tree0ab3faef0b223c1fdab885defcdee951cfa7c184 /src/test/debuginfo/enum-thinlto.rs
parent2477e2493e67527fc282c7239e019f7ebd513a1a (diff)
downloadrust-23d221153f3d453166a765010f0029369e77b508.tar.gz
rust-23d221153f3d453166a765010f0029369e77b508.zip
Use KERN_ARND syscall for random numbers on NetBSD, same as FreeBSD.
This system call is present on all supported NetBSD versions and
provides an endless stream of non-blocking random data from the
kernel's ChaCha20-based CSPRNG. It doesn't require a file descriptor
to be opened.

The system call is documented here (under kern.arandom):
https://netbsd.gw.com/cgi-bin/man-cgi?sysctl+7+NetBSD-7.0

And defined here:
https://nxr.netbsd.org/xref/src/sys/sys/sysctl.h#273

The semantics are the same as FreeBSD so reading 256 bytes per call
is fine.

Similar change for getrandom crate: rust-random/getrandom#115
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions