summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--random/jitterentropy-base.c2
-rw-r--r--random/jitterentropy.h2
-rw-r--r--random/rndjent.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/random/jitterentropy-base.c b/random/jitterentropy-base.c
index c9cdb026..9aef266a 100644
--- a/random/jitterentropy-base.c
+++ b/random/jitterentropy-base.c
@@ -725,8 +725,10 @@ int jent_entropy_init_ex(unsigned int osr, unsigned int flags)
return jent_entropy_init_common_post(ret);
}
+#ifdef JENT_CONF_ENABLE_INTERNAL_TIMER
JENT_PRIVATE_STATIC
int jent_entropy_switch_notime_impl(struct jent_notime_thread *new_thread)
{
return jent_notime_switch(new_thread);
}
+#endif
diff --git a/random/jitterentropy.h b/random/jitterentropy.h
index 02c60b78..0a91f36a 100644
--- a/random/jitterentropy.h
+++ b/random/jitterentropy.h
@@ -382,9 +382,11 @@ int jent_entropy_init_ex(unsigned int osr, unsigned int flags);
JENT_PRIVATE_STATIC
unsigned int jent_version(void);
+#ifdef JENT_CONF_ENABLE_INTERNAL_TIMER
/* Set a different thread handling logic for the notimer support */
JENT_PRIVATE_STATIC
int jent_entropy_switch_notime_impl(struct jent_notime_thread *new_thread);
+#endif
/* -- END of Main interface functions -- */
diff --git a/random/rndjent.c b/random/rndjent.c
index 0fab3deb..4bac9102 100644
--- a/random/rndjent.c
+++ b/random/rndjent.c
@@ -301,7 +301,7 @@ _gcry_rndjent_poll (void (*add)(const void*, size_t, enum random_origins),
size_t n = length < sizeof(buffer)? length : sizeof (buffer);
jent_rng_totalcalls++;
- rc = jent_read_entropy (jent_rng_collector, buffer, n);
+ rc = jent_read_entropy_safe (&jent_rng_collector, buffer, n);
if (rc < 0)
break;
/* We need to hash the output to conform to the BSI