Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

[nrf noup] zephyr: Fix the CSRNG define #177

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/utils/os_zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,13 @@ void os_daemonize_terminate(const char *pid_file)

int os_get_random(unsigned char *buf, size_t len)
{
#if defined(CONFIG_ENTROPY_HAS_DRIVER)
return sys_csrand_get(buf, len);
#else
sys_rand_get(buf, len);

return 0;
#endif
}

unsigned long os_random(void)
Expand Down
Loading