Message ID | 1dcd01a6-0ad0-94b2-ef9e-28c4c854db44@redhat.com |
---|---|
State | New |
Headers | show |
On Thu, Dec 29, 2016 at 12:30 AM, Florian Weimer <fweimer@redhat.com> wrote: > On 12/28/2016 06:02 PM, Zack Weinberg wrote: >> >> So the decision to make when choosing between the two is "should this >> be visible by default?" I would personally tend to err on the side of >> "no" when adding new things to core headers like unistd.h. > > At least we should treat getentropy and explicit_bzero in an identical > fashion. > > What about this patch? Fine with me.
getentropy: Declare it in <unistd.h> for __USE_MISC 2016-12-29 Florian Weimer <fweimer@redhat.com> * posix/unistd.h (getentropy): Declare for __USE_MISC, not just __USE_GNU. diff --git a/posix/unistd.h b/posix/unistd.h index 70b10c6..a8c9aa9 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -1157,7 +1157,7 @@ extern int pthread_atfork (void (*__prepare) (void), void (*__child) (void)) __THROW; #endif -#ifdef __USE_GNU +#ifdef __USE_MISC /* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on success or -1 on error. */ int getentropy (void *__buffer, size_t __length) __wur;