From 11a39bb49a1b23aa09379dab21f34975b674fac2 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sat, 13 Jul 2013 19:24:14 -0400 Subject: Cmake changed, small change in random_int() Cmake builds now builds the new ncurses test only on non windows. --- core/network.c | 4 +++- core/network.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/network.c b/core/network.c index 9693df1c..c08b3512 100644 --- a/core/network.c +++ b/core/network.c @@ -48,9 +48,11 @@ uint64_t current_time() } +//return a random number +//NOTE: this function should probably not be used where cryptographic randomness is absolutely necessary uint32_t random_int() { - #ifdef WIN32 + #ifndef VANILLA_NACL //NOTE: this function comes from libsodium return randombytes_random(); #else diff --git a/core/network.h b/core/network.h index 4fa30905..33f11239 100644 --- a/core/network.h +++ b/core/network.h @@ -97,6 +97,7 @@ typedef struct uint64_t current_time(); //return a random number +//NOTE: this function should probably not be used where cryptographic randomness is absolutely necessary uint32_t random_int(); //Basic network functions: -- cgit v1.2.3