From 0a85924fdd5ed6bfbac030e9a2ca5ddf70e0119f Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Sat, 11 Dec 2010 23:28:33 -0800 Subject: [PATCH] datapath: Compatibility code for __packed macro. The __packed macro for structure packing wasn't introduced until 2.6.24, so define it ourselves. 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-gcc.h | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 datapath/linux-2.6/compat-2.6/include/linux/compiler-gcc.h diff --git a/datapath/linux-2.6/Modules.mk b/datapath/linux-2.6/Modules.mk index e1e33347..29379a49 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-gcc.h \ linux-2.6/compat-2.6/include/linux/cpumask.h \ linux-2.6/compat-2.6/include/linux/dmi.h \ linux-2.6/compat-2.6/include/linux/err.h \ diff --git a/datapath/linux-2.6/compat-2.6/include/linux/compiler-gcc.h b/datapath/linux-2.6/compat-2.6/include/linux/compiler-gcc.h new file mode 100644 index 00000000..1ee8d6f7 --- /dev/null +++ b/datapath/linux-2.6/compat-2.6/include/linux/compiler-gcc.h @@ -0,0 +1,9 @@ +#ifndef __LINUX_COMPILER_H +#error "Please don't include directly, include instead." +#endif + +#include_next + +#ifndef __packed +#define __packed __attribute__((packed)) +#endif -- 2.30.2