about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-12-27 17:13:21 +0100
committerFlorian Weimer <fweimer@redhat.com>2016-12-27 17:13:21 +0100
commitccb8b7f7d488f11570042226bed17dfee8afb3c8 (patch)
treec6a82d837a043ba447b0b82126ac7e7aed689caa
parent7d68cdaa4f748e87ee921f587ee2d483db624b3d (diff)
downloadglibc-ccb8b7f7d488f11570042226bed17dfee8afb3c8.tar.gz
glibc-ccb8b7f7d488f11570042226bed17dfee8afb3c8.tar.xz
glibc-ccb8b7f7d488f11570042226bed17dfee8afb3c8.zip
Declare getentropy in <unistd.h> [BZ #17252]
-rw-r--r--ChangeLog5
-rw-r--r--posix/unistd.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c072b668e..6d43ec83cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2016-12-27  Florian Weimer  <fweimer@redhat.com>
 
+	[BZ #17252]
+	* posix/unistd.h (getentropy): Declare.
+
+2016-12-27  Florian Weimer  <fweimer@redhat.com>
+
 	* resolv/res_hconf.h (HCONF_FLAG_SPOOF, HCONF_FLAG_SPOOFALERT):
 	Remove.
 	* resolv/res_hconf.c (ENV_SPOOF, arg_spoof): Remove.
diff --git a/posix/unistd.h b/posix/unistd.h
index 392dc0e004..70b10c6a88 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -1157,6 +1157,11 @@ extern int pthread_atfork (void (*__prepare) (void),
 			   void (*__child) (void)) __THROW;
 #endif
 
+#ifdef __USE_GNU
+/* Write LENGTH bytes of randomness starting at BUFFER.  Return 0 on
+   success or -1 on error.  */
+int getentropy (void *__buffer, size_t __length) __wur;
+#endif
 
 /* Define some macros helping to catch buffer overflows.  */
 #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function