From b36e75b7f12c75bd852b8bcee36ea6bd9727d5c0 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Mon, 26 Sep 2016 01:30:49 +0200 Subject: [PATCH] don't read from c:\dev\random on windows --- src/prngs/rng_get_bytes.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/prngs/rng_get_bytes.c b/src/prngs/rng_get_bytes.c index b1236c4..2a66367 100644 --- a/src/prngs/rng_get_bytes.c +++ b/src/prngs/rng_get_bytes.c @@ -141,11 +141,10 @@ unsigned long rng_get_bytes(unsigned char *out, unsigned long outlen, LTC_ARGCHK(out != NULL); -#if defined(LTC_DEVRANDOM) - x = rng_nix(out, outlen, callback); if (x != 0) { return x; } -#endif #if defined(_WIN32) || defined(_WIN32_WCE) x = rng_win32(out, outlen, callback); if (x != 0) { return x; } +#elif defined(LTC_DEVRANDOM) + x = rng_nix(out, outlen, callback); if (x != 0) { return x; } #endif #ifdef ANSI_RNG x = rng_ansic(out, outlen, callback); if (x != 0) { return x; }