summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-10-23 21:18:15 +0900
committerJason A. Donenfeld <Jason@zx2c4.com>2016-10-23 21:18:15 +0900
commit155b6bda7188323a6062ade282b45e4296bcc825 (patch)
treed0cb359e1a4a7382a828e99ec8e5465703103c5e /src
parentdata: reset all packet fields like tun.c (diff)
downloadwireguard-monolithic-historical-155b6bda7188323a6062ade282b45e4296bcc825.tar.xz
wireguard-monolithic-historical-155b6bda7188323a6062ade282b45e4296bcc825.zip
compat: grsecurity backports get_random_longexperimental-0.0.20161025
Diffstat (limited to 'src')
-rw-r--r--src/compat.h3
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)