mirror of
https://github.com/json-c/json-c.git
synced 2026-03-25 16:09:06 +08:00
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.
This commit is contained 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user