mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-23 20:15:19 -07:00
getentropy() may be defined but NULL on older iOS versions
This commit is contained in:
parent
6a6a5cc79e
commit
d54f0721cd
@ -180,6 +180,12 @@ static int
|
||||
_randombytes_getentropy(void * const buf, const size_t size)
|
||||
{
|
||||
assert(size <= 256U);
|
||||
/* LCOV_EXCL_START */
|
||||
if (&getentropy == NULL) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
/* LCOV_EXCL_END */
|
||||
if (getentropy(buf, size) != 0) {
|
||||
return -1; /* LCOV_EXCL_LINE */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user