]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/randutils.c: Fall back gracefully when kernel doesn't support getrandom(2).
authorChristopher James Halse Rogers <raof@ubuntu.com>
Mon, 7 Aug 2017 06:07:54 +0000 (16:07 +1000)
committerChristopher James Halse Rogers <raof@ubuntu.com>
Tue, 8 Aug 2017 01:27:49 +0000 (11:27 +1000)
commita7df0f5f3537d062dcf2f7d85cf2f919bf384b16
treecc1a9677b21be0751dedbded8cb2fa12db3d00f5
parenta6b1ec864a3eb1d27a8781fe99d65e4e6ac05e5b
lib/randutils.c: Fall back gracefully when kernel doesn't support getrandom(2).

The 3.16 kernel is supported until 2020, and various distros have kernels of the same
vintage. It's entirely possible for code built against newer headers to be run against
these kernels, so fall-back to the old “read /dev/{u,}random” method if the kernel doesn'
support getrandom()
lib/randutils.c