diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-10-23 21:18:15 +0900 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-10-23 21:18:15 +0900 |
commit | 6466b384adee7f508a7cbfc17aca8b17dd61a732 (patch) | |
tree | 77e5bcd4c4706105fad62685656e1e40f6e64aa9 /src | |
parent | 13a3e7de2a4a140b65890b08201c7faf9a411280 (diff) |
compat: grsecurity backports get_random_long
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/compat.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h index 6b748d4..6663ec6 100644 --- a/src/compat.h +++ b/src/compat.h @@ -17,8 +17,11 @@ #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) +#include <linux/security.h> +#ifndef GRSECURITY_VERSION #define get_random_long() (((u64)get_random_int() << 32) | get_random_int()) #endif +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) #define RCU_LOCKDEP_WARN(cond, message) rcu_lockdep_assert(!(cond), message) |