]> git.saurik.com Git - apple/libc.git/blob - gen/FreeBSD/lrand48.c.patch
90798d98c2d283b03fb3cb19e217308668a8c2b2
[apple/libc.git] / gen / FreeBSD / lrand48.c.patch
1 --- lrand48.c.orig 2009-11-07 14:51:38.000000000 -0800
2 +++ lrand48.c 2009-11-07 14:51:39.000000000 -0800
3 @@ -16,11 +16,9 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/lra
4
5 #include "rand48.h"
6
7 -extern unsigned short _rand48_seed[3];
8 -
9 long
10 lrand48(void)
11 {
12 - _dorand48(_rand48_seed);
13 - return ((long) _rand48_seed[2] << 15) + ((long) _rand48_seed[1] >> 1);
14 + _DORAND48(_rand48_seed);
15 + return (_rand48_seed >> 17) & 0x7fffffff;
16 }