diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-07-30 16:13:04 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-07-31 08:28:07 -0700 |
commit | 6cf48477960b96aedca2c87cf7bb53861ceeecd2 (patch) | |
tree | a00a95f02e22d8bfdbcf9c30b3ae4bce8a799c15 /cmake | |
parent | 002411293d0271424827d970cc34d39968559137 (diff) | |
download | json-c-6cf48477960b96aedca2c87cf7bb53861ceeecd2.tar.gz |
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.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/config.h.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/config.h.in b/cmake/config.h.in index 547a585..9e097cb 100644 --- a/cmake/config.h.in +++ b/cmake/config.h.in @@ -56,6 +56,9 @@ /* Define to 1 if you have the <sys/param.h> header file. */ #cmakedefine HAVE_SYS_PARAM_H @HAVE_SYS_PARAM_H@ +/* Define to 1 if you have the <sys/random.h> header file. */ +#cmakedefine HAVE_SYS_RANDOM_H + /* Define to 1 if you have the <sys/resource.h> header file. */ #cmakedefine HAVE_SYS_RESOURCE_H @@ -140,6 +143,9 @@ /* Define to 1 if you have the `vsyslog' function. */ #cmakedefine HAVE_VSYSLOG @HAVE_VSYSLOG@ +/* Define if you have the `getrandom' function. */ +#cmakedefine HAVE_GETRANDOM + /* Define if you have the `getrusage' function. */ #cmakedefine HAVE_GETRUSAGE |