Skip to content

os: replace GenerateRandomData() by custom arc4random_buf() on platforms that missing it

Enrico Weigelt requested to merge metux/xserver:submit/arc4random_buf into master

arc4random_buf() is a pretty standard libc function on Unix'oid platforms, but not all our targets have it, thus we need a fallback there. Currently we have GenerateRandomData(), which either just wraps arc4random_buf() or provides some fallback implementation.

For those cases it's easier to just implement missing functions directly instead of having custom wrapper functions. So, drop GenerateRandomData() in favor of arc4random_buf() and provide fallback implementation for where it is missing.

Signed-off-by: Enrico Weigelt, metux IT consult

Merge request reports