Issue #594 - provide an OVERRIDE_GET_RANDOM_SEED cmake variable to override json_c_get_random_seed() for embedded platforms where time(NULL) doesn't work.

Example:
mkdir build && cd build
cmake -DOVERRIDE_GET_RANDOM_SEED='do { extern uint32_t getMsTicks(void); int ms = getMsTicks() * 433494437; return ms; } while(0)' ..
This commit is contained in:
Eric Haszlakiewicz
2020-07-22 02:25:03 +00:00
parent 64de4b6e9f
commit 730e3d044f
4 changed files with 9 additions and 0 deletions

View File

@@ -2,6 +2,9 @@
/* Enable RDRAND Hardware RNG Hash Seed */
#cmakedefine ENABLE_RDRAND "@ENABLE_RDRAND@"
/* Override json_c_get_random_seed() with custom code */
#cmakedefine OVERRIDE_GET_RANDOM_SEED @OVERRIDE_GET_RANDOM_SEED@
/* Enable partial threading support */
#cmakedefine ENABLE_THREADING "@@"