Better getentropy() usability checks

This commit is contained in:
Frank Denis 2019-10-23 18:23:31 +02:00
parent bfa866e2f0
commit 5c804e1ac8
2 changed files with 8 additions and 10 deletions

7
configure vendored
View File

@ -19145,12 +19145,11 @@ int
main () main ()
{ {
#ifdef __APPLE__
# error getentropy() is currently disabled on Apple operating systems
#endif
unsigned char buf; unsigned char buf;
if (&getentropy != NULL) {
(void) getentropy((void *) &buf, 1U); (void) getentropy((void *) &buf, 1U);
}
; ;
return 0; return 0;

View File

@ -848,12 +848,11 @@ unsigned char buf;
# error A recent libasan version on an old system may intercept nonexistent functions # error A recent libasan version on an old system may intercept nonexistent functions
#endif #endif
]], [[ ]], [[
#ifdef __APPLE__
# error getentropy() is currently disabled on Apple operating systems
#endif
unsigned char buf; unsigned char buf;
if (&getentropy != NULL) {
(void) getentropy((void *) &buf, 1U); (void) getentropy((void *) &buf, 1U);
}
]])], ]])],
[AC_MSG_RESULT(yes) [AC_MSG_RESULT(yes)
AC_CHECK_FUNCS([getentropy])], AC_CHECK_FUNCS([getentropy])],