summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/lib/rand.c
blob: beb2d27179503674bce2685e70f59e162b9a47a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdlib.h>

static unsigned int seed=1;

int rand(void) {
  return rand_r(&seed);
}

void srand(unsigned int i) { seed=i; }

int random(void) __attribute__((alias("rand")));
void srandom(unsigned int i) __attribute__((alias("srand")));