From: Jesse Gross Date: Sun, 12 Dec 2010 07:28:33 +0000 (-0800) Subject: datapath: Compatibility code for __packed macro. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a85924fdd5ed6bfbac030e9a2ca5ddf70e0119f;p=openvswitch 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 --- 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