* [B.A.T.M.A.N.] [PATCH maint] batman-adv: Only provide (READ|WRITE)_ONCE when undefined
@ 2018-03-11 9:20 Sven Eckelmann
0 siblings, 0 replies; only message in thread
From: Sven Eckelmann @ 2018-03-11 9:20 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Sven Eckelmann, Ralf Jung
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>
---
Cc: Ralf Jung <post+openmesh@ralfj.de>
See https://www.open-mesh.org/issues/350
---
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 62b6a2f9..45cd49fa 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) */
--
2.16.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-11 9:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-11 9:20 [B.A.T.M.A.N.] [PATCH maint] batman-adv: Only provide (READ|WRITE)_ONCE when undefined Sven Eckelmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).