public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
* [2.25 COMMITTED] Fix the return type of the getentropy stub
@ 2017-01-01  0:00 Aurelien Jarno
  0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2017-01-01  0:00 UTC (permalink / raw)
  To: libc-stable; +Cc: Aurelien Jarno

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)
---
 ChangeLog           | 4 ++++
 stdlib/getentropy.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

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);
-- 
2.13.2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-03 22:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-01  0:00 [2.25 COMMITTED] Fix the return type of the getentropy stub Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).