From 420287e2da5312f5b6f1e1771fd8b379d13b6307 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 6 Jul 2020 10:40:45 -0500 Subject: random: initial work at a new module This is a _dangerously_ naive implementation. Do not ship. --- libgcompat/random.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 libgcompat/random.c (limited to 'libgcompat') diff --git a/libgcompat/random.c b/libgcompat/random.c new file mode 100644 index 0000000..5fb9e3f --- /dev/null +++ b/libgcompat/random.c @@ -0,0 +1,11 @@ +#include +#include + +int initstate_r(unsigned int seed, char *statebuf, size_t statelen, void *buf) { + return 0; +} + +int random_r(struct random_data *buf, int32_t *result) { + *result = random(); + return 0; +} -- cgit v1.2.3-70-g09d2