summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdlib/rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/rand.c')
-rw-r--r--newlib/libc/stdlib/rand.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/stdlib/rand.c b/newlib/libc/stdlib/rand.c
index 6a46aa807..131e5cf09 100644
--- a/newlib/libc/stdlib/rand.c
+++ b/newlib/libc/stdlib/rand.c
@@ -72,7 +72,8 @@ on two different systems.
void
_DEFUN (srand, (seed), unsigned int seed)
{
- _REENT_RAND_NEXT(_REENT) = seed;
+ _REENT_CHECK_RAND48(_REENT);
+ _REENT_RAND_NEXT(_REENT) = seed;
}
int