mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Cmake changed, small change in random_int()
Cmake builds now builds the new ncurses test only on non windows.
This commit is contained in:
parent
5b3c4442dd
commit
11a39bb49a
|
@ -9,9 +9,13 @@ set(core_sources
|
|||
core/Lossless_UDP.c
|
||||
core/net_crypto.c
|
||||
core/Messenger.c)
|
||||
|
||||
if(WIN32)
|
||||
set(test_sources
|
||||
testing/Messenger_test.c)
|
||||
else()
|
||||
set(test_sources
|
||||
testing/nTox.c)
|
||||
endif()
|
||||
|
||||
add_executable(${exe_name}
|
||||
${core_sources}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user