diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | libgcompat/random.c | 11 |
2 files changed, 12 insertions, 0 deletions
@@ -17,6 +17,7 @@ LIBGCOMPAT_SRC = \ libgcompat/netdb.c \ libgcompat/pthread.c \ libgcompat/pwd.c \ + libgcompat/random.c \ libgcompat/readlink.c \ libgcompat/realpath.c \ libgcompat/resolv.c \ 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; +} |