]> git.ipfire.org Git - thirdparty/json-c.git/commit
Use getrandom() if available in json_c_get_random_seed 651/head
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Thu, 30 Jul 2020 23:13:04 +0000 (16:13 -0700)
committerAlan Coopersmith <alan.coopersmith@oracle.com>
Fri, 31 Jul 2020 15:28:07 +0000 (08:28 -0700)
commit6cf48477960b96aedca2c87cf7bb53861ceeecd2
treea00a95f02e22d8bfdbcf9c30b3ae4bce8a799c15
parent002411293d0271424827d970cc34d39968559137
Use getrandom() if available in json_c_get_random_seed

Lower overhead than opening & reading from /dev/urandom, and works
in chroots and other situtations where /dev/urandom is not available.
Falls back to existing methods when kernel doesn't support the syscall.
CMakeLists.txt
cmake/config.h.in
random_seed.c