mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-03-12 08:55:28 +00:00
Fix use getrandom on cosmopolitan libc (#2674)
Fixes the Cosmopolitan Libc platform attempting to use `/dev/urandom` on operating systems that do not have it. Signed-off-by: G4Vi <gavin@dylibso.com>
This commit is contained in:
parent
9b8fe049b3
commit
51a6b069d2
|
@ -26,7 +26,7 @@
|
|||
|
||||
// On Linux, prefer to use getrandom, though it isn't available in
|
||||
// GLIBC before 2.25.
|
||||
#if (defined(__linux__) || defined(ESP_PLATFORM)) \
|
||||
#if (defined(__linux__) || defined(ESP_PLATFORM) || defined(__COSMOPOLITAN__)) \
|
||||
&& (!defined(__GLIBC__) || __GLIBC__ > 2 \
|
||||
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 25))
|
||||
#define CONFIG_HAS_GETRANDOM 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user