diff --git a/configure b/configure index bb26c755..46e2e521 100755 --- a/configure +++ b/configure @@ -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; diff --git a/configure.ac b/configure.ac index 152c7c0d..a996c20e 100644 --- a/configure.ac +++ b/configure.ac @@ -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])],