summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-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)