Return to arc4random.c CVS log | Up to [cvs.NetBSD.org] / src / lib / libc / gen |
Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. |
version 1.4, 2002/07/02 17:10:19 | version 1.5, 2002/11/11 01:13:07 | ||
---|---|---|---|
|
|
||
} | } | ||
#ifdef KERN_URND | #ifdef KERN_URND | ||
else { | else { | ||
int i, mib[2]; | int mib[2]; | ||
u_int i; | |||
size_t len; | size_t len; | ||
/* Device could not be opened, we might be chrooted, take | /* Device could not be opened, we might be chrooted, take | ||
|
|
||
mib[0] = CTL_KERN; | mib[0] = CTL_KERN; | ||
mib[1] = KERN_URND; | mib[1] = KERN_URND; | ||
for (i = 0; i < sizeof(rdat.rnd) / sizeof(u_int); i ++) { | for (i = 0; i < sizeof(rdat.rnd) / sizeof(u_int); i++) { | ||
len = sizeof(u_int); | len = sizeof(u_int); | ||
if (sysctl(mib, 2, &rdat.rnd[i], &len, NULL, 0) == -1) | if (sysctl(mib, 2, &rdat.rnd[i], &len, NULL, 0) == -1) | ||
break; | break; |