util/rand_xor: extend the urandom path to all non-Windows platforms

Any system that provides `/dev/urandom` should be allowed to try to use it.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>
This commit is contained in:
Eric Engestrom
2019-10-13 08:57:35 +01:00
committed by Marge Bot
parent d76abe98cf
commit fa3549c92b
+4 -2
View File
@@ -22,7 +22,9 @@
*
*/
#if defined(__linux__)
#include "detect_os.h"
#if !DETECT_OS_WINDOWS
#if defined(HAVE_GETRANDOM)
#include <sys/random.h>
#endif
@@ -63,7 +65,7 @@ s_rand_xorshift128plus(uint64_t seed[2], bool randomised_seed)
return;
}
#if defined(__linux__)
#if !DETECT_OS_WINDOWS
size_t seed_size = sizeof(uint64_t) * 2;
#if defined(HAVE_GETRANDOM)