diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-12-13 16:00:44 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-12-13 16:07:21 -0500 |
commit | f2feceddae6f3bd3722247f3458860b955f539bc (patch) | |
tree | 6e8405e81ac080995db7cc20ebd51c1e4de5e4cb /include/linux/random.h | |
parent | fa36882a73fbb3fd771c506641a1d70d51c07068 (diff) |
Shim layer updates
Diffstat (limited to 'include/linux/random.h')
-rw-r--r-- | include/linux/random.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/random.h b/include/linux/random.h index 95a15d05..6d63e045 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -37,4 +37,12 @@ static inline int get_random_int(void) return v; } +static inline long get_random_long(void) +{ + long v; + + get_random_bytes(&v, sizeof(v)); + return v; +} + #endif /* _LINUX_RANDOM_H */ |