diff --git a/rng/unix/mc_getrandom_stubs.c b/rng/unix/mc_getrandom_stubs.c index c36a6335..8b80eee8 100644 --- a/rng/unix/mc_getrandom_stubs.c +++ b/rng/unix/mc_getrandom_stubs.c @@ -1,4 +1,6 @@ -#include +#ifndef _MSC_VER +# include +#endif #include #include @@ -41,7 +43,7 @@ void raw_getrandom (uint8_t *data, uint32_t len) { if (getentropy(data + i, rlen) < 0) uerror("getentropy", Nothing); } } -#elif (defined(__WIN32__)) +#elif (defined(__WIN32__) || defined(_WIN32)) /* There is a choice between using RtlGenRandom and BCryptGenRandom * here, and Microsoft does not make the choice obvious. It appears * that RtlGenRandom is best used when older Windows compatibility