aboutsummaryrefslogtreecommitdiffstats
path: root/unmodified_drivers/linux-2.6/compat-include
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@xensource.com>2006-10-25 13:58:30 +0100
committerIan Campbell <ian.campbell@xensource.com>2006-10-25 13:58:30 +0100
commit6b8b36040d478d336d3c93e87dec37594cc64a79 (patch)
tree9e0dc49c0b915c7f81da1aeb15fd4bb7a33263e8 /unmodified_drivers/linux-2.6/compat-include
parentda611bef470513702e4d94979b289c5d9439e58d (diff)
downloadxen-6b8b36040d478d336d3c93e87dec37594cc64a79.tar.gz
xen-6b8b36040d478d336d3c93e87dec37594cc64a79.tar.bz2
xen-6b8b36040d478d336d3c93e87dec37594cc64a79.zip
PV-to-HVM: Add compatibility definitions of various #defines when they
are not present in the kernel we are building against. Signed-off-by: Ian Campbell <ian.campbell@xensource.com> Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com> Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Diffstat (limited to 'unmodified_drivers/linux-2.6/compat-include')
-rw-r--r--unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
index 72b6fd4dee..cccdabf258 100644
--- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
+++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
@@ -3,4 +3,26 @@
#include <linux/version.h>
+#include <linux/spinlock.h>
+
+#if defined(__LINUX_COMPILER_H) && !defined(__always_inline)
+#define __always_inline inline
+#endif
+
+#if defined(__LINUX_SPINLOCK_H) && !defined(DEFINE_SPINLOCK)
+#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
+#endif
+
+#if defined(_LINUX_INIT_H) && !defined(__init)
+#define __init
+#endif
+
+#if defined(__LINUX_CACHE_H) && !defined(__read_mostly)
+#define __read_mostly
+#endif
+
+#if defined(_LINUX_SKBUFF_H) && !defined(NET_IP_ALIGN)
+#define NET_IP_ALIGN 0
+#endif
+
#endif