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:
committed by
Marge Bot
parent
d76abe98cf
commit
fa3549c92b
+4
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user