Skip to content

util/rand_xor: use getrandom() when available

Link Mauve requested to merge linkmauve/mesa:linux-getrandom into master

This function has been added in glibc 2.25, and the related syscall in Linux 3.17, in order to avoid requiring the /dev/urandom to exist, and doing the open()/read()/close() dance on it.

Signed-off-by: Emmanuel Gil Peyrot linkmauve@linkmauve.fr

Unrelatedly, shouldn’t the /dev/urandom path be also enabled on non-Linux systems, instead of the fixed fallback?

Merge request reports