Repository : ssh://git@open-mesh.org/batman-adv
On branch : maint
commit a155327b3364f69bfdf6b0b017772f79e46f884e Author: Sven Eckelmann sven@narfation.org Date: Sun Mar 11 10:20:29 2018 +0100
batman-adv: Only provide (READ|WRITE)_ONCE when undefined
The Debian Jessie 3.16.x kernels (3.16.36-1 and later) modified the the kernel sources to already provide the READ_ONCE and WRITE_ONCE kernel macros. The batman-adv compat helper defines will conflict on such kernels and thus prevent the compilation against these downstream kernels.
Reported-by: Ralf Jung post@ralfj.de Signed-off-by: Sven Eckelmann sven@narfation.org
a155327b3364f69bfdf6b0b017772f79e46f884e compat-include/linux/compiler.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/compat-include/linux/compiler.h b/compat-include/linux/compiler.h index 62b6a2f..45cd49f 100644 --- a/compat-include/linux/compiler.h +++ b/compat-include/linux/compiler.h @@ -26,11 +26,15 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
+#ifndef READ_ONCE #define READ_ONCE(x) ACCESS_ONCE(x) +#endif
+#ifndef WRITE_ONCE #define WRITE_ONCE(x, val) ({ \ ACCESS_ONCE(x) = (val); \ }) +#endif
#endif /* < KERNEL_VERSION(3, 19, 0) */