blob: e96cfba99cdb9c8cb4b2c0d834389b864e857e23 [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#include <stdlib.h>
2
3int rand_r(unsigned *seed)
4{
5 return (*seed = *seed * 1103515245 + 12345) & 0x7fffffff;
6}