aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-12 05:49:58 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-17 19:26:07 +0200
commit1020782ac3975f2a27fdfc6649fd55b66ca0a97f (patch)
treeb2e506450343bded77ada1c64ea7539d0e7565dc /src/compat
parentdevice: no need to take lock for integer comparison (diff)
downloadwireguard-monolithic-historical-1020782ac3975f2a27fdfc6649fd55b66ca0a97f.tar.xz
wireguard-monolithic-historical-1020782ac3975f2a27fdfc6649fd55b66ca0a97f.zip
compat: support READ_ONCE
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 65a1076..1f490c5 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -41,6 +41,10 @@
#define __ro_after_init __read_mostly
#endif
+#ifndef READ_ONCE
+#define READ_ONCE ACCESS_ONCE
+#endif
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
#include "udp_tunnel/udp_tunnel_partial_compat.h"
#endif