summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-06 21:10:21 -0500
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-17 08:12:41 -0800
commit39f8c7961dcd530e88d13c600145097106647d2e (patch)
tree0519a50d0ca6c71a57b98525a3b8ef0bd74bf244 /configure
parent7b880464cb31b779259d56123e03cf3903d476e5 (diff)
lavu/random_seed: use arc4random() when available
arc4random() was designed as a superior interface for system random number generation, designed for OpenBSD and subsequently incorporated by other BSD's, Mac OS X, and some non-standard libc's. It is thus an improvement to use it whenever available. As a side note, this may or may not get included in glibc, and there is a proposal to create a posix_random family based on these ideas: http://austingroupbugs.net/view.php?id=859. Tested on Mac OS X. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure b/configure
index 7662f37133..dc1d2eb807 100755
--- a/configure
+++ b/configure
@@ -1841,6 +1841,7 @@ MATH_FUNCS="
SYSTEM_FUNCS="
access
aligned_malloc
+ arc4random
clock_gettime
closesocket
CommandLineToArgvW
@@ -5232,6 +5233,7 @@ check_func ${malloc_prefix}memalign && enable memalign
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
check_func access
+check_func arc4random
check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
check_func fcntl
check_func fork