aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-04 05:31:59 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-05 15:27:29 +0200
commit774858d42aefc8fe583906cb889242bfa8fa10c7 (patch)
tree68d905b47db30eb2f8732cc581f5b2a98fd75d8a /src/compat/compat.h
parentcompat: support ptr_ring for old kernels (diff)
downloadwireguard-linux-compat-774858d42aefc8fe583906cb889242bfa8fa10c7.tar.xz
wireguard-linux-compat-774858d42aefc8fe583906cb889242bfa8fa10c7.zip
compat: conditionally redefine GENL_UNS_ADMIN_PERM
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r--src/compat/compat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index d37533b..5903ac1 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -425,8 +425,11 @@ static inline struct nlattr **genl_family_attrbuf(const struct genl_family *fami
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+#include <net/genetlink.h>
+#ifndef GENL_UNS_ADMIN_PERM
#define GENL_UNS_ADMIN_PERM GENL_ADMIN_PERM
#endif
+#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
#include <net/genetlink.h>