diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-18 00:10:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-18 00:10:46 +0000 |
commit | 8195282dfc4752ae8ec7fc1cb18f7c8e5f3d9d65 (patch) | |
tree | 39756d99a65ba6bfd648e942a72e448740e19a03 | |
parent | b12c5a85b47c55d94b5baace09ad668ce610f716 (diff) |
* random.c (fill_random_seed): needs wincrypt.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | random.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -380,6 +380,9 @@ random_init(int argc, VALUE *argv, VALUE obj) #else # define USE_DEV_URANDOM 0 #endif +#ifdef _WIN32 +#include <wincrypt.h> +#endif static void fill_random_seed(unsigned int seed[DEFAULT_SEED_CNT]) @@ -414,7 +417,7 @@ fill_random_seed(unsigned int seed[DEFAULT_SEED_CNT]) } #elif defined(_WIN32) if (CryptAcquireContext(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { - CryptGenRandom(prov, DEFAULT_SEED_LEN, seed); + CryptGenRandom(prov, DEFAULT_SEED_LEN, (void *)seed); CryptReleaseContext(prov, 0); } #endif |