diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-10 17:38:27 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-11 15:50:21 +0200 |
commit | 7fef9f33a57ed1cf24ebb9c5f0646e95b89aa07b (patch) | |
tree | bc89e3c9363fd42ad7c6ceeb9fd8ff753fc083f2 /src/compat/compat.h | |
parent | tools: store tail pointer to make coalescing peers fast (diff) | |
download | wireguard-monolithic-historical-7fef9f33a57ed1cf24ebb9c5f0646e95b89aa07b.tar.xz wireguard-monolithic-historical-7fef9f33a57ed1cf24ebb9c5f0646e95b89aa07b.zip |
compat: move version logic to compat.h and out of main .c
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r-- | src/compat/compat.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index c75bfe3..efd4d45 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -438,6 +438,7 @@ static inline struct nlattr **genl_family_attrbuf(const struct genl_family *fami #else #define genl_register_family(a) genl_register_family_with_ops(a, genl_ops) #endif +#define COMPAT_CANNOT_USE_GENL_NOPS #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) @@ -452,6 +453,19 @@ static int get_device_dump(a, b) { \ return get_device_dump_real(skb, cb); \ } \ static int get_device_dump_real(a, b) +#define COMPAT_CANNOT_USE_NETLINK_START +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) +#define COMPAT_CANNOT_USE_IN6_DEV_GET +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) +#define COMPAT_CANNOT_USE_DEV_CNF +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) +#define COMPAT_CANNOT_USE_IFF_NO_QUEUE #endif /* https://lkml.org/lkml/2017/6/23/790 */ |