aboutsummaryrefslogtreecommitdiffstats
path: root/man3/getentropy.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/getentropy.3')
-rw-r--r--man3/getentropy.38
1 files changed, 6 insertions, 2 deletions
diff --git a/man3/getentropy.3 b/man3/getentropy.3
index 697f9375b7..b341284cb0 100644
--- a/man3/getentropy.3
+++ b/man3/getentropy.3
@@ -26,7 +26,7 @@
.SH NAME
getentropy \- fill a buffer with random bytes
.SH SYNOPSIS
-.B #include <sys/random.h>
+.B #include <unistd.h>
.sp
.BI "int getentropy(void *" buffer ", size_t " length );
.SH DESCRIPTION
@@ -43,7 +43,7 @@ argument is 256.
A successful call to
.BR getentropy ()
-always returns the requested number of bytes of entropy.
+always returns zero and provides the requested number of bytes of entropy.
.SH RETURN VALUE
On success, this function returns zero,
On error, \-1 is returned, and
@@ -90,6 +90,10 @@ a cancellation point,
.BR getentropy ()
is not a cancellation point.
+In earlier versions of glibc this function was avaible under the
+.BR <sys/random.h>
+header.
+
A call to
.BR getentropy ()
may block if the system has just booted and the kernel has