summaryrefslogtreecommitdiff
path: root/libgcompat
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-07-06 10:40:45 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-07-06 10:40:45 -0500
commit420287e2da5312f5b6f1e1771fd8b379d13b6307 (patch)
treee14b9345cac75be12dc4f98abed62d7642fa79b2 /libgcompat
parentdb5dae20793d5696c5c3e905d2c467c2ff0a23a1 (diff)
downloadgcompat-420287e2da5312f5b6f1e1771fd8b379d13b6307.tar.gz
gcompat-420287e2da5312f5b6f1e1771fd8b379d13b6307.tar.bz2
gcompat-420287e2da5312f5b6f1e1771fd8b379d13b6307.tar.xz
gcompat-420287e2da5312f5b6f1e1771fd8b379d13b6307.zip
random: initial work at a new modulerandom
This is a _dangerously_ naive implementation. Do not ship.
Diffstat (limited to 'libgcompat')
-rw-r--r--libgcompat/random.c11
1 files changed, 11 insertions, 0 deletions
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 <inttypes.h>
+#include <stdlib.h>
+
+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;
+}