mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
hurd: Make getrandom return ENOSYS when /dev/random is not set up
So that callers (e.g. __arc4random_buf) don't try calling it again.
This commit is contained in:
parent
0a9e93842d
commit
494714d407
1 changed files with 7 additions and 2 deletions
|
@ -123,8 +123,13 @@ again:
|
|||
open_flags, 0);
|
||||
__libc_rwlock_unlock (lock);
|
||||
if (!MACH_PORT_VALID (server))
|
||||
/* No luck. */
|
||||
return -1;
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
/* No translator set up, we won't have support for it. */
|
||||
errno = ENOSYS;
|
||||
/* No luck. */
|
||||
return -1;
|
||||
}
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue