aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make/job.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2008-09-29 16:13:28 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2008-09-29 16:13:28 +0000
commita3d1e4d95a0c07133b9481f997e12c03feca2907 (patch)
treeebdfe644ef46315820f8ecd76d21a680bcbbc51f /usr.bin/make/job.c
parent338b0cb957050c6fdccd6eb379fc691e7ef0b403 (diff)
Notes
Diffstat (limited to 'usr.bin/make/job.c')
-rw-r--r--usr.bin/make/job.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 54bba3f98866..77a7f8607396 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -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;