Since in some cases (when found obsolete) 'make' can be builded earlier

at 'upgrade_checks' target, put arc4random_uniform() into
__FreeBSD_version ifdef.
This commit is contained in:
Andrey A. Chernov 2008-09-29 16:13:28 +00:00
parent 338b0cb957
commit a3d1e4d95a

View File

@ -411,7 +411,12 @@ mkfifotemp(char *template)
* them with random characters until there are no more 'X'.
*/
while (ptr >= template && *ptr == 'X') {
uint32_t rand_num = arc4random_uniform(sizeof(padchar) - 1);
uint32_t rand_num =
#if __FreeBSD_version < 800041
arc4random() % (sizeof(padchar) - 1);
#else
arc4random_uniform(sizeof(padchar) - 1);
#endif
*ptr-- = padchar[rand_num];
}
start = ptr + 1;