From a5834e1e25c693c8e4b0f79b91a25467bb8e4d9b Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 21 Oct 2013 21:11:06 -0700 Subject: [PATCH] Use arc4random() if available in onetimeauth_poly1305_try.c --- .../crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c b/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c index 6e242d22..82d67867 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c +++ b/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c @@ -47,6 +47,11 @@ deallocate(void) free(k2_); } +#ifdef HAVE_ARC4RANDOM +# undef rand +# define rand(X) arc4random(X) +#endif + static const char * checksum_compute(void) {