diff options
Diffstat (limited to 'libntp/ntp_crypto_rnd.c')
-rw-r--r-- | libntp/ntp_crypto_rnd.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libntp/ntp_crypto_rnd.c b/libntp/ntp_crypto_rnd.c index 62a808d..96348f2 100644 --- a/libntp/ntp_crypto_rnd.c +++ b/libntp/ntp_crypto_rnd.c @@ -22,6 +22,22 @@ #include <openssl/rand.h> int crypto_rand_init = 0; +#else + +# ifndef HAVE_ARC4RANDOM_BUF +static void +arc4random_buf(void *buf, size_t nbytes); + +void +evutil_secure_rng_get_bytes(void *buf, size_t nbytes); + +static void +arc4random_buf(void *buf, size_t nbytes) +{ + evutil_secure_rng_get_bytes(buf, nbytes); + return; +} +# endif #endif /* @@ -85,6 +101,7 @@ ntp_crypto_random_buf( err = ERR_get_error(); err_str = ERR_error_string(err, NULL); /* XXX: Log the error */ + (void)&err_str; return -1; } |