diff options
author | Ian Campbell <ian.campbell@xensource.com> | 2007-04-05 15:38:09 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@xensource.com> | 2007-04-05 15:38:09 +0100 |
commit | 93d1b5695a55cfc6085deb7ceef4685a6cc9d6fb (patch) | |
tree | 1467cee43e5ecc66c8c4be846d4b476738398aed /unmodified_drivers/linux-2.6/compat-include | |
parent | b6293b0c3a937578bf22a8cd1d7506327f99b579 (diff) | |
download | xen-93d1b5695a55cfc6085deb7ceef4685a6cc9d6fb.tar.gz xen-93d1b5695a55cfc6085deb7ceef4685a6cc9d6fb.tar.bz2 xen-93d1b5695a55cfc6085deb7ceef4685a6cc9d6fb.zip |
LINUX: PVonHVM: Fixes to build with kernels back to 2.6.5.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Diffstat (limited to 'unmodified_drivers/linux-2.6/compat-include')
-rw-r--r-- | unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h | 14 |
1 files changed, 13 insertions, 1 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 d327d703ea..f6a9371034 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 @@ -40,7 +40,7 @@ /* Some kernels have this typedef backported so we cannot reliably * detect based on version number, hence we forcibly #define it. */ -#if defined(__LINUX_TYPES_H) || defined(__LINUX_GFP_H) +#if defined(__LINUX_TYPES_H) || defined(__LINUX_GFP_H) || defined(_LINUX_KERNEL_H) #define gfp_t unsigned #endif @@ -51,6 +51,14 @@ #define atomic_notifier_call_chain(chain,val,v) notifier_call_chain(chain,val,v) #endif +#if defined(_LINUX_MM_H) && defined set_page_count +#define init_page_count(page) set_page_count(page, 1) +#endif + +#if defined(__LINUX_GFP_H) && !defined __GFP_NOMEMALLOC +#define __GFP_NOMEMALLOC 0 +#endif + #if defined(_LINUX_FS_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) #define nonseekable_open(inode, filp) /* Nothing to do */ #endif @@ -75,6 +83,10 @@ void *kzalloc(size_t size, int flags); #define end_that_request_last(req, uptodate) end_that_request_last(req) #endif +#if defined(_LINUX_CAPABILITY_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) +#define capable(cap) (1) +#endif + #if defined(_LINUX_KERNEL_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) extern char *kasprintf(gfp_t gfp, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); |