mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 11:00:11 +01:00
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:
parent
d76abe98cf
commit
fa3549c92b
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue