summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdk-stage1/dietlibc/include/stdlib.h3
-rw-r--r--mdk-stage1/dietlibc/lib/random.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/mdk-stage1/dietlibc/include/stdlib.h b/mdk-stage1/dietlibc/include/stdlib.h
index 1ec15e145..6a13a48ff 100644
--- a/mdk-stage1/dietlibc/include/stdlib.h
+++ b/mdk-stage1/dietlibc/include/stdlib.h
@@ -61,4 +61,7 @@ char *realpath(const char *path, char *resolved_path) __THROW;
int abs(int j) __THROW;
+long int random(void) __THROW;
+void srandom(unsigned int seed) __THROW;
+
#endif
diff --git a/mdk-stage1/dietlibc/lib/random.c b/mdk-stage1/dietlibc/lib/random.c
index 02d1e1004..e7785c455 100644
--- a/mdk-stage1/dietlibc/lib/random.c
+++ b/mdk-stage1/dietlibc/lib/random.c
@@ -2,7 +2,7 @@
static unsigned int seed=1;
-int random() {
+long int random() {
return ((seed = seed * 1103515245 + 12345) % ((unsigned int)RAND_MAX + 1));
}