mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #4685 from d00616/fix_native_random
pkg/driver: native random fix for micro-ecc
This commit is contained in:
commit
52d6444725
@ -137,9 +137,12 @@ void _native_rng_init_hq(void)
|
||||
{
|
||||
DEBUG("_native_rng_init_hq\n");
|
||||
_native_syscall_enter();
|
||||
dev_random = real_open("/dev/random", O_RDONLY);
|
||||
dev_random = real_open("/dev/urandom", O_RDONLY | O_CLOEXEC);
|
||||
if (dev_random == -1) {
|
||||
err(EXIT_FAILURE, "_native_rng_init_hq: open(/dev/random)");
|
||||
dev_random = real_open("/dev/random", O_RDONLY | O_CLOEXEC);
|
||||
if (dev_random == -1) {
|
||||
err(EXIT_FAILURE, "_native_rng_init_hq: open(/dev/urandom|/dev/random)");
|
||||
}
|
||||
}
|
||||
_native_syscall_leave();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user