From 25389c1e52124bca19911e886e76739ddbb2410f Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 28 Oct 2024 09:39:20 +0800 Subject: [PATCH] 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 --- libs/libc/stdlib/lib_arc4random.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/libc/stdlib/lib_arc4random.c b/libs/libc/stdlib/lib_arc4random.c index 8ff406c44c94b..e8760d17335d0 100644 --- a/libs/libc/stdlib/lib_arc4random.c +++ b/libs/libc/stdlib/lib_arc4random.c @@ -30,8 +30,8 @@ #include #include #include +#include -#include #include /**************************************************************************** @@ -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);