The branch main has been updated by bz:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=10096cb60619984eefc628471f219d4723867bb1

commit 10096cb60619984eefc628471f219d4723867bb1
Author:     Bjoern A. Zeeb <b...@freebsd.org>
AuthorDate: 2021-05-24 18:38:58 +0000
Commit:     Bjoern A. Zeeb <b...@freebsd.org>
CommitDate: 2021-05-25 18:01:46 +0000

    LinuxKPI: add prandom_u32() as used by wireless drivers.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      2 weeks
    Reviewed by:    hselasky
    Differential Revision: https://reviews.freebsd.org/D30435
---
 sys/compat/linuxkpi/common/include/linux/random.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/random.h 
b/sys/compat/linuxkpi/common/include/linux/random.h
index 31d8b996aa0b..12de0e12bc5a 100644
--- a/sys/compat/linuxkpi/common/include/linux/random.h
+++ b/sys/compat/linuxkpi/common/include/linux/random.h
@@ -63,6 +63,15 @@ get_random_long(void)
        return (val);
 }
 
+static __inline uint32_t
+prandom_u32(void)
+{
+       uint32_t val;
+
+       get_random_bytes(&val, sizeof(val));
+       return (val);
+}
+
 static inline u32
 prandom_u32_max(u32 max)
 {
_______________________________________________
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"

Reply via email to