aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/km-rand-erand48.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/km-rand-erand48.c b/src/km-rand-erand48.c
index 3d7b02d..544a77c 100644
--- a/src/km-rand-erand48.c
+++ b/src/km-rand-erand48.c
@@ -4,6 +4,17 @@
#include "util.h"
#include "km.h"
+#ifdef _WIN32
+bool
+km_rand_init_erand48(
+ km_rand_t * const rs,
+ const uint64_t seed
+) {
+ srand(seed);
+ km_rand_init_libc(rs);
+ return true;
+}
+#else /* !_WIN32 */
// get N get_floats
static bool
on_get_floats(
@@ -87,3 +98,5 @@ km_rand_init_erand48(
// return success
return true;
}
+
+#endif /* _WIN32 */