From: Miroslav Lichvar Date: Mon, 5 Oct 2020 14:17:45 +0000 (+0200) Subject: configure: don't check for getrandom when arc4random is present X-Git-Tag: 4.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=545d2563ef20c36e5106bed922d683ca610ccd8f;p=thirdparty%2Fchrony.git configure: don't check for getrandom when arc4random is present On FreeBSD 12, both functions seem to be available. Prefer arc4random. --- diff --git a/configure b/configure index c9d0e601..845b0962 100755 --- a/configure +++ b/configure @@ -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='