mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
FreeBSD: fix compilation of FreeBSD world after 29274c9f6
prng32_bounded() is available to kernel only on FreeBSD 13+. Call inline random_get_pseudo_bytes() with correct pointer type. To be consistent, apply to Linux as well. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Martin Matuska <mm@FreeBSD.org> Closes #12282
This commit is contained in:
@@ -648,7 +648,7 @@ random_in_range(uint32_t range)
|
||||
if (range == 1)
|
||||
return (0);
|
||||
|
||||
(void) random_get_pseudo_bytes((void *)&r, sizeof (r));
|
||||
(void) random_get_pseudo_bytes((uint8_t *)&r, sizeof (r));
|
||||
|
||||
return (r % range);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user