mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Better getentropy() usability checks
This commit is contained in:
@@ -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;
|
||||
|
||||
+4
-5
@@ -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])],
|
||||
|
||||
Reference in New Issue
Block a user