summaryrefslogtreecommitdiffhomepage
path: root/src/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-11-14 04:04:56 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2016-11-15 02:42:36 +0100
commitf720efb41ce78afb702e4f8d8967e7f2192ec35e (patch)
tree902088a48db967e62c6ed4f12d3f9489681577c2 /src/compat.h
parent47b7ab7a6c1ccc98e98fd50ac8a9edfc22c587f3 (diff)
compat: rearrange
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat.h')
-rw-r--r--src/compat.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/compat.h b/src/compat.h
index 42fa7fe..7577222 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -141,13 +141,6 @@ static inline int dst_cache_init(struct dst_cache *dst_cache, gfp_t gfp) { retur
static inline void dst_cache_destroy(struct dst_cache *dst_cache) { }
#endif
-/* PaX compatibility */
-#ifdef CONSTIFY_PLUGIN
-#include <linux/cache.h>
-#undef __read_mostly
-#define __read_mostly
-#endif
-
/* https://lkml.org/lkml/2015/6/12/415 */
#include <linux/netdevice.h>
static inline struct net_device *netdev_pub(void *dev)
@@ -155,6 +148,13 @@ static inline struct net_device *netdev_pub(void *dev)
return (struct net_device *)((char *)dev - ALIGN(sizeof(struct net_device), NETDEV_ALIGN));
}
+/* PaX compatibility */
+#ifdef CONSTIFY_PLUGIN
+#include <linux/cache.h>
+#undef __read_mostly
+#define __read_mostly
+#endif
+
#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG)
#define net_dbg_skb_ratelimited(fmt, skb, ...) do { \
struct endpoint __endpoint; \