aboutsummaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-03-29 14:46:47 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2017-04-10 14:00:22 +0200
commit9cf011f94b56e8832c5a5d8cf66d4a115d34b9cc (patch)
tree583c2f208f9bdc1cb88593d472e7d8a1eaf46508 /man3
parent6c1f939f086523c67a17e24c80c70db62b47b34d (diff)
downloadman-pages-9cf011f94b56e8832c5a5d8cf66d4a115d34b9cc.tar.gz
getentropy.3: Correct header file
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3')
-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