]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix the return type of the getentropy stub
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 3 Aug 2017 22:35:48 +0000 (22:35 +0000)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 3 Aug 2017 22:35:48 +0000 (22:35 +0000)
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.

ChangeLog
stdlib/getentropy.c

index 90dd59045b385b656726fecb6d5d7b8bcb1d2329..1d336afb258a2c04f5209be7fba1942df4f85571 100644 (file)
--- 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-08-03  Aurelien Jarno  <aurelien@aurel32.net>
 
        * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Regenerated.
index a71d4cd8f5fe32c5838db61bc176b66c0b5225bb..a88bbf8de3c6888f5d544e2009b8194ce2e70fdd 100644 (file)
@@ -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);