aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorThomas Gschwantner <tharre3@gmail.com>2018-06-20 23:09:59 +0200
committerThomas Gschwantner <tharre3@gmail.com>2018-06-20 23:36:33 +0200
commit436b11f165b17b520ef0b006c3b0acedf4c14614 (patch)
treecae413a4ac37fc766b7a798fa38052eff2237ffe /src/compat/compat.h
parentmpmc_ptr_ring: Fix a word (diff)
downloadwireguard-monolithic-historical-436b11f165b17b520ef0b006c3b0acedf4c14614.tar.xz
wireguard-monolithic-historical-436b11f165b17b520ef0b006c3b0acedf4c14614.zip
mpmc_ptr_ring: use atomic_try_cmpxchg()
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r--src/compat/compat.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 2853c09..5affedf 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -591,6 +591,11 @@ static inline void *skb_put_data(struct sk_buff *skb, const void *data, unsigned
}
#endif
+#include <linux/atomic.h>
+#if !defined(atomic_try_cmpxchg)
+#include "atomic/atomic.h"
+#endif
+
/* https://lkml.org/lkml/2017/6/23/790 */
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
#include <linux/ip.h>