random: Allow building rndjent on non-x86.
authorWerner Koch <wk@gnupg.org>
Wed, 21 Jun 2017 07:24:42 +0000 (09:24 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 21 Jun 2017 07:24:42 +0000 (09:24 +0200)
commitc2319464b03e61aaf34ef6d5f4b59b0c0483a373
tree6133dfa60cb5cbb87cc8a3957b3a6a0b852cc09e
parent32b4ab209067f6f08b87b27bc78ec27dc497b708
random: Allow building rndjent on non-x86.

* random/jitterentropy-base.c (jent_version): Uncomment function.
* random/rndjent.c: Include time.h
(JENT_USES_RDTSC): New.
(JENT_USES_GETTIME): New.
(JENT_USES_READ_REAL_TIME): New.
(jent_get_nstime): Support clock_gettime and AIX specific
function.  Taken from Stephan Müller's code.
(is_rng_available): New.
(_gcry_rndjent_dump_stats): Use that function.
(_gcry_rndjent_poll): Use that fucntion.  Allow an ADD of NULL for an
intialize only mode.
(_gcry_rndjent_get_version): New.

Signed-off-by: Werner Koch <wk@gnupg.org>
random/jitterentropy-base.c
random/random.h
random/rndjent.c