util/os_file: replace broken windows-detection code with detect_os.h
[mesa.git] / src / util / rand_xor.c
index 3668ac9b84a0309aec837642b71873cb3be687d1..81b64f1ea71712a49338e5b77bf9ae166413e671 100644 (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)