configure: don't check for getrandom when arc4random is present

On FreeBSD 12, both functions seem to be available. Prefer arc4random.
This commit is contained in:
Miroslav Lichvar 2020-10-05 16:17:45 +02:00
parent 1494ef1df3
commit 545d2563ef

10
configure vendored
View file

@ -689,11 +689,11 @@ fi
if test_code 'arc4random_buf()' 'stdlib.h' '' '' 'arc4random_buf(NULL, 0);'; then
add_def HAVE_ARC4RANDOM
fi
if test_code 'getrandom()' 'stdlib.h sys/random.h' '' '' \
'return getrandom(NULL, 256, 0);'; then
add_def HAVE_GETRANDOM
else
if test_code 'getrandom()' 'stdlib.h sys/random.h' '' '' \
'return getrandom(NULL, 256, 0);'; then
add_def HAVE_GETRANDOM
fi
fi
RECVMMSG_CODE='