diff --git a/man2/getrandom.2 b/man2/getrandom.2 index c9d139c7f..dd79bab80 100644 --- a/man2/getrandom.2 +++ b/man2/getrandom.2 @@ -273,8 +273,8 @@ The special treatment of small values of .I buflen was designed for compatibility with OpenBSD's -.BR getentropy () -system call. +.BR getentropy (3), +which is nowadays supported by glibc. .PP The user of .BR getrandom () @@ -289,33 +289,6 @@ is not specified and is less than or equal to 256, a return of fewer bytes than requested should never happen, but the careful programmer will check for this anyway! -.\" -.SS Emulating OpenBSD's getentropy() -The -.BR getentropy () -system call in OpenBSD can be emulated using the following -function: - -.in +4n -.nf -int -getentropy(void *buf, size_t buflen) -{ - int ret; - - if (buflen > 256) - goto failure; - ret = getrandom(buf, buflen, 0); - if (ret < 0) - return ret; - if (ret == buflen) - return 0; -failure: - errno = EIO; - return \-1; -} -.fi -.in .SH BUGS As of Linux 3.19, the following bug exists: .\" FIXME patch proposed https://lkml.org/lkml/2014/11/29/16 @@ -324,6 +297,7 @@ Depending on CPU load, .BR getrandom () does not react to interrupts before reading all bytes requested. .SH SEE ALSO +.BR getentropy (3), .BR random (4), .BR urandom (4), .BR random (7),