diff --git a/extras/mini-os/lib/math.c b/extras/mini-os/lib/math.c index c941b4c420..561393e629 100644 --- a/extras/mini-os/lib/math.c +++ b/extras/mini-os/lib/math.c @@ -424,16 +424,3 @@ __moddi3(quad_t a, quad_t b) (void)__qdivrem(ua, ub, &ur); return (neg ? -ur : ur); } - -#ifndef HAVE_LIBC -/* Should be random enough for our uses */ -int rand(void) -{ - static unsigned int previous; - struct timeval tv; - gettimeofday(&tv, NULL); - previous += tv.tv_sec + tv.tv_usec; - previous *= RAND_MIX; - return previous; -} -#endif diff --git a/extras/mini-os/test.c b/extras/mini-os/test.c index 20d372b888..0d7aba4191 100644 --- a/extras/mini-os/test.c +++ b/extras/mini-os/test.c @@ -60,6 +60,19 @@ static void xenbus_tester(void *p) } #endif +#ifndef HAVE_LIBC +/* Should be random enough for our uses */ +int rand(void) +{ + static unsigned int previous; + struct timeval tv; + gettimeofday(&tv, NULL); + previous += tv.tv_sec + tv.tv_usec; + previous *= RAND_MIX; + return previous; +} +#endif + static void periodic_thread(void *p) { struct timeval tv;