BSD has <sys/random.h> first, but has getentropy() in there. glibc has getentropy() in addition to getrandom(), but they keep it in <unistd.h> instead. Since both went in in glibc 2.25 I don't think this will matter in practice, but if this does cause trouble, we can have separate getentropy() and getrandom() implementations for the BSDs versus glibc.
This does mean that the only valid values for `flags` are now 0 or WARN_ONLY, but that was already effectively true anyway because GRND_NONBLOCK != O_NONBLOCK so the fallback path was already broken. --- lib/portability.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
0001-xgetrandom-fix-macOS-build.patch
Description: Binary data
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
