diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-11-04 16:49:06 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-11-04 16:49:06 +0100 |
commit | 00f69a8725e08e38cf03696155e63c3c0b83dee0 (patch) | |
tree | b284ed51a989d22df03a3a0d08aa20ef6b34cec2 /src | |
parent | data: use a memory cache for parallel ctx (diff) | |
download | wireguard-monolithic-historical-00f69a8725e08e38cf03696155e63c3c0b83dee0.tar.xz wireguard-monolithic-historical-00f69a8725e08e38cf03696155e63c3c0b83dee0.zip |
compat: some grsec have get_random_long; others do not
Diffstat (limited to 'src')
-rw-r--r-- | src/compat.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compat.h b/src/compat.h index 6d9c0e2..b2cc9c9 100644 --- a/src/compat.h +++ b/src/compat.h @@ -18,9 +18,10 @@ #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()) +#ifdef GRSECURITY_VERSION +#include <linux/random.h> #endif +#define get_random_long() (((u64)get_random_int() << 32) | get_random_int()) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) |