1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 02:25:14 -07:00

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

9
configure vendored
View File

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

View File

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