mirror of
https://github.com/apache/nuttx.git
synced 2026-08-15 09:23:20 +00:00
libc: Fix lib_arc4random.c:111:(.text.arc4random_buf+0x26): undefined reference to `clock_systime_ticks'
by replacing clock_systime_ticks to clock Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
c08e1bafb3
commit
992c8dded5
1 changed files with 2 additions and 2 deletions
|
|
@ -30,8 +30,8 @@
|
|||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/random.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <nuttx/clock.h>
|
||||
#include <nuttx/hashtable.h>
|
||||
|
||||
/****************************************************************************
|
||||
|
|
@ -108,7 +108,7 @@ void arc4random_buf(FAR void *bytes, size_t nbytes)
|
|||
|
||||
while (nbytes > 0)
|
||||
{
|
||||
uint32_t hash = HASH(clock_systime_ticks() - nbytes, 32);
|
||||
uint32_t hash = HASH(clock() - nbytes, 32);
|
||||
size_t ncopy = MIN(nbytes, sizeof(hash));
|
||||
|
||||
memcpy(bytes, &hash, ncopy);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue