aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-01-06 11:49:06 -0500
committerJason A. Donenfeld <Jason@zx2c4.com>2019-01-23 14:29:44 +0100
commit8c8de14b703e11331646b041ca5868bdac448122 (patch)
tree0d4bbd405c9cf1c98f65233c53b5e35dc1a5dfc4 /src/compat
parentnoise: replace getnstimeofday64 with ktime_get_real_ts64 (diff)
downloadwireguard-monolithic-historical-8c8de14b703e11331646b041ca5868bdac448122.tar.xz
wireguard-monolithic-historical-8c8de14b703e11331646b041ca5868bdac448122.zip
ratelimiter: totalram_pages is now a function
Reported-by: Alex Xu <alex@alxu.ca>
Diffstat (limited to 'src/compat')
-rw-r--r--src/compat/compat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 4ffe387..15cf8bb 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -748,6 +748,10 @@ static inline void crypto_xor_cpy(u8 *dst, const u8 *src1, const u8 *src2,
#define hlist_add_behind(a, b) hlist_add_after(b, a)
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0)
+#define totalram_pages() totalram_pages
+#endif
+
/* https://github.com/ClangBuiltLinux/linux/issues/7 */
#if defined( __clang__) && (!defined(CONFIG_CLANG_VERSION) || CONFIG_CLANG_VERSION < 80000)
#include <linux/bug.h>