From 17dd5650f8726930844802abacde27d25bd31844 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 21 May 2012 17:42:32 -0700 Subject: [PATCH] rt: Fix def of isaac_seed on windows --- src/rt/rust_builtin.cpp | 2 +- src/rt/rust_util.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index b8b8bc30163..939e9621989 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -185,7 +185,7 @@ rand_seed() { rust_vec *v = (rust_vec *) task->kernel->malloc(vec_size(size), "rand_seed"); v->fill = v->alloc = size; - isaac_seed((uint8_t*) &v->data); + isaac_seed(task->kernel, (uint8_t*) &v->data); return v; } diff --git a/src/rt/rust_util.h b/src/rt/rust_util.h index 35bd7242557..b517362df1f 100644 --- a/src/rt/rust_util.h +++ b/src/rt/rust_util.h @@ -98,7 +98,7 @@ make_str_vec(rust_kernel* kernel, size_t nstrs, char **strs) { // Initialization helpers for ISAAC RNG -inline void isaac_seed(uint8_t* dest) +inline void isaac_seed(rust_kernel* kernel, uint8_t* dest) { size_t size = sizeof(ub4) * RANDSIZ; #ifdef __WIN32__ @@ -137,7 +137,7 @@ isaac_init(rust_kernel *kernel, randctx *rctx, rust_vec* user_seed) seed = (seed + 0x7ed55d16) + (seed << 12); } } else { - isaac_seed((uint8_t*) &rctx->randrsl); + isaac_seed(kernel, (uint8_t*) &rctx->randrsl); } randinit(rctx, 1);