use libc-internal malloc for newlocale/freelocale
[musl] / src / prng / mrand48.c
index ee650fc..f4a56e6 100644 (file)
@@ -1,12 +1,10 @@
 #include <stdlib.h>
 #include <inttypes.h>
-
-uint64_t __rand48_step(unsigned short *xi, unsigned short *lc);
-extern unsigned short __seed48[7];
+#include "rand48.h"
 
 long jrand48(unsigned short s[3])
 {
-       return __rand48_step(s, __seed48+3) >> 16;
+       return (int32_t)(__rand48_step(s, __seed48+3) >> 16);
 }
 
 long mrand48(void)