--- jrand48.c.orig 2009-11-07 14:51:38.000000000 -0800 +++ jrand48.c 2009-11-07 14:51:39.000000000 -0800 @@ -19,6 +19,7 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/jra long jrand48(unsigned short xseed[3]) { - _dorand48(xseed); - return ((long) xseed[2] << 16) + (long) xseed[1]; + uint48 tmp; + DORAND48(tmp, xseed); + return (int)((tmp >> 16) & 0xffffffff); }