From ccb8b7f7d488f11570042226bed17dfee8afb3c8 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 27 Dec 2016 17:13:21 +0100 Subject: [PATCH] Declare getentropy in [BZ #17252] --- ChangeLog | 5 +++++ posix/unistd.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8c072b668e..6d43ec83cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-12-27 Florian Weimer + + [BZ #17252] + * posix/unistd.h (getentropy): Declare. + 2016-12-27 Florian Weimer * resolv/res_hconf.h (HCONF_FLAG_SPOOF, HCONF_FLAG_SPOOFALERT): 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