mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-28 22:05:40 +08:00
fix arm compilation (PR 694)
This commit is contained in:
parent
1cb0193ff1
commit
f20d22a3e4
@ -759,7 +759,7 @@ bool _mi_prim_random_buf(void* buf, size_t buf_len) {
|
|||||||
ssize_t ret = syscall(SYS_getrandom, buf, buf_len, GRND_NONBLOCK);
|
ssize_t ret = syscall(SYS_getrandom, buf, buf_len, GRND_NONBLOCK);
|
||||||
if (ret >= 0) return (buf_len == (size_t)ret);
|
if (ret >= 0) return (buf_len == (size_t)ret);
|
||||||
if (errno != ENOSYS) return false;
|
if (errno != ENOSYS) return false;
|
||||||
mi_atomic_store_release(&no_getrandom, 1UL); // don't call again, and fall back to /dev/urandom
|
mi_atomic_store_release(&no_getrandom, (uintptr_t)1); // don't call again, and fall back to /dev/urandom
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
int flags = O_RDONLY;
|
int flags = O_RDONLY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user