forked from Imagelibrary/binutils-gdb
Update gnulib
This updates gnulib to a relatively recent commit. Most of this was done by the gnulib import script; the only change I made was to update-gnulib.sh. Tested on x86-64 Fedora 34. I also did a mingw cross build.
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
/* Obtain a series of random bytes.
|
||||
|
||||
Copyright 2020-2021 Free Software Foundation, Inc.
|
||||
Copyright 2020-2022 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation; either version 2.1 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
This file is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
@@ -178,7 +178,11 @@ getrandom (void *buffer, size_t length, unsigned int flags)
|
||||
+ (flags & GRND_NONBLOCK ? O_NONBLOCK : 0));
|
||||
fd = open (randdevice[devrandom], oflags);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
{
|
||||
if (errno == ENOENT || errno == ENOTDIR)
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
randfd[devrandom] = fd;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user