summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/prng/seed48.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/prng/seed48.c')
-rw-r--r--libc-top-half/musl/src/prng/seed48.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/prng/seed48.c b/libc-top-half/musl/src/prng/seed48.c
new file mode 100644
index 0000000..bce7b33
--- /dev/null
+++ b/libc-top-half/musl/src/prng/seed48.c
@@ -0,0 +1,11 @@
+#include <stdlib.h>
+#include <string.h>
+#include "rand48.h"
+
+unsigned short *seed48(unsigned short *s)
+{
+ static unsigned short p[3];
+ memcpy(p, __seed48, sizeof p);
+ memcpy(__seed48, s, sizeof p);
+ return p;
+}