From 92ed6c964081eda31fb5ea87f6348d382c9a7c40 Mon Sep 17 00:00:00 2001 From: Johannes Engel Date: Mon, 23 Jun 2008 17:10:26 +0100 Subject: [PATCH 1/1] Make drm-gem compile with kernel >= 2.6.26 Signed-off-by: Johannes Engel --- linux-core/drmP.h | 5 +++++ linux-core/i915_gem.h | 4 ++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/linux-core/drmP.h b/linux-core/drmP.h index ec8a61d..2e47b13 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -94,6 +94,11 @@ struct drm_file; typedef unsigned long uintptr_t; #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) +#define TRUE 1 +#define FALSE 0 +#endif + /* If you want the memory alloc debug functionality, change define below */ /* #define DEBUG_MEMORY */ diff --git a/linux-core/i915_gem.h b/linux-core/i915_gem.h index 5481841..d13f0e8 100644 --- a/linux-core/i915_gem.h +++ b/linux-core/i915_gem.h @@ -1,3 +1,7 @@ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) +#include +#endif + enum sgp_type { SGP_READ, /* don't exceed i_size, don't allocate page */ SGP_CACHE, /* don't exceed i_size, may allocate page */ -- 1.5.4.5