From fb3ea74b114e7c1089dfb8851d0b5fb18aa9a6ce Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Fri, 19 Nov 2010 17:48:04 -0800 Subject: [PATCH] datapath: Add compatibility code for sparse annotations. The __percpu and __rcu annotations for sparse are relatively recent additions, so provide no-op definitions on older kernels. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- datapath/linux-2.6/Modules.mk | 1 + .../linux-2.6/compat-2.6/include/linux/compiler.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 datapath/linux-2.6/compat-2.6/include/linux/compiler.h diff --git a/datapath/linux-2.6/Modules.mk b/datapath/linux-2.6/Modules.mk index 29379a49..1bc092e1 100644 --- a/datapath/linux-2.6/Modules.mk +++ b/datapath/linux-2.6/Modules.mk @@ -11,6 +11,7 @@ openvswitch_headers += \ linux-2.6/compat-2.6/compat26.h \ linux-2.6/compat-2.6/include/asm-generic/bug.h \ linux-2.6/compat-2.6/include/linux/bottom_half.h \ + linux-2.6/compat-2.6/include/linux/compiler.h \ linux-2.6/compat-2.6/include/linux/compiler-gcc.h \ linux-2.6/compat-2.6/include/linux/cpumask.h \ linux-2.6/compat-2.6/include/linux/dmi.h \ diff --git a/datapath/linux-2.6/compat-2.6/include/linux/compiler.h b/datapath/linux-2.6/compat-2.6/include/linux/compiler.h new file mode 100644 index 00000000..dbe3ca74 --- /dev/null +++ b/datapath/linux-2.6/compat-2.6/include/linux/compiler.h @@ -0,0 +1,14 @@ +#ifndef __LINUX_COMPILER_WRAPPER_H +#define __LINUX_COMPILER_WRAPPER_H 1 + +#include_next + +#ifndef __percpu +#define __percpu +#endif + +#ifndef __rcu +#define __rcu +#endif + +#endif -- 2.30.2