summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2017-08-03 22:35:48 +0000
committerAurelien Jarno <aurelien@aurel32.net>2017-08-04 00:52:48 +0200
commite249a1e2a33f7134a4510b06ec7809e563777bba (patch)
tree4427169713fe3f35d3b33b1aad004d5ca41fa197
parentda3e97f94c80c5d05c0d999e87179aad35f7e975 (diff)
downloadglibc-e249a1e2a33f7134a4510b06ec7809e563777bba.tar.gz
Fix the return type of the getentropy stub
The return type of the getentropy stub is wrongly defined as ssize_t, while both the <sys/random.h> header and the Linux implementation define it as int. This patch fixes that. Changelog: * stdlib/getentropy.c (getentropy): Change return type to int. (cherry picked from commit 2b34e2716f1e84b2c3457ffc868c3dc775b55845)
-rw-r--r--ChangeLog4
-rw-r--r--stdlib/getentropy.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b70096ae6d..acb4b80537 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-03 Aurelien Jarno <aurelien@aurel32.net>
+
+ * stdlib/getentropy.c (getentropy): Change return type to int.
+
2017-04-28 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
[BZ #21280]
diff --git a/stdlib/getentropy.c b/stdlib/getentropy.c
index a71d4cd8f5..a88bbf8de3 100644
--- a/stdlib/getentropy.c
+++ b/stdlib/getentropy.c
@@ -21,7 +21,7 @@
/* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on
success and -1 on failure. */
-ssize_t
+int
getentropy (void *buffer, size_t length)
{
__set_errno (ENOSYS);