From: Jesse Gross Date: Sat, 20 Nov 2010 01:48:04 +0000 (-0800) Subject: datapath: Add compatibility code for sparse annotations. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb3ea74b114e7c1089dfb8851d0b5fb18aa9a6ce;p=openvswitch 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 --- 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