From 7c3a2f7bd35342bf8eca51d86f6e77c2f65c3753 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sun, 27 Feb 2005 22:26:45 +0000 Subject: [PATCH] patch from Ian Abbott : This patch against CVS also applies to comedi-0.7.69 and allows it to compile correctly against Red Hat 9's 2.4.20-8 kernel, and probably others using the "statm" kernel patch. It also changes the conditions for defining the pte_offset_kernel() macro in the asm/pgtable.h compatibility header to avoid it being redefined. --- include/asm/pgtable.h | 8 ++------ include/linux/mm.h | 7 ++++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/asm/pgtable.h b/include/asm/pgtable.h index 84017b2f..20fe5b8d 100644 --- a/include/asm/pgtable.h +++ b/include/asm/pgtable.h @@ -19,15 +19,11 @@ #ifndef __COMPAT_ASM_PGTABLE_H_ #define __COMPAT_ASM_PGTABLE_H_ -#include - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include_next +#ifndef pte_offset_kernel #define pte_offset_kernel(dir,address) pte_offset(dir,address) - #endif -#include_next - #endif /* __COMPAT_ASM_PGTABLE_H_ */ diff --git a/include/linux/mm.h b/include/linux/mm.h index a7ab7ce9..39ed289b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -14,7 +14,12 @@ #define VM_OFFSET(a) ((a)->vm_pgoff * PAGE_SIZE) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10) \ + && LINUX_VERSION_CODE < KERNEL_VERSION(2,5,3) +#include /* look for tlb_vma() macro for "statm" patch */ +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,3) && !defined(tlb_vma) #define REMAP_PAGE_RANGE(a,b,c,d,e) remap_page_range(b,c,d,e) #else #define REMAP_PAGE_RANGE(a,b,c,d,e) remap_page_range(a,b,c,d,e) -- 2.26.2