Fix alpha, mips, parisc <asm/mman.h>
Kyle McMartin <[email protected]>
| Newsgroups | gmane.linux.debian.devel.kernel,gmane.linux.ports.hppa |
|---|---|
| Message-ID | <[email protected]> |
Fix <asm/mman.h> on arches which do not include the asm-generic mman.h header. Guard the define of arch_mmap_check() in an #ifndef __ASSEMBLY__ in case mman.h ends up included in assembly code as on ia64. Signed-off-by: Kyle McMartin <[email protected]> --- diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h index 5f24c75..97ebc74 100644 --- a/include/asm-alpha/mman.h +++ b/include/asm-alpha/mman.h @@ -52,4 +52,8 @@ #define MADV_DOFORK 11 /* do inherit ac #define MAP_ANON MAP_ANONYMOUS #define MAP_FILE 0 +#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#define arch_mmap_check(addr, len, flags) (0) +#endif + #endif /* __ALPHA_MMAN_H__ */ diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h index 046cf68..07b7cce 100644 --- a/include/asm-mips/mman.h +++ b/include/asm-mips/mman.h @@ -75,4 +75,8 @@ #define MADV_DOFORK 11 /* do inherit ac #define MAP_ANON MAP_ANONYMOUS #define MAP_FILE 0 +#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#define arch_mmap_check(addr, len, flags) (0) +#endif + #endif /* _ASM_MMAN_H */ diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h index 0ef15ee..d015a4e 100644 --- a/include/asm-parisc/mman.h +++ b/include/asm-parisc/mman.h @@ -59,4 +59,8 @@ #define MAP_ANON MAP_ANONYMOUS #define MAP_FILE 0 #define MAP_VARIABLE 0 +#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#define arch_mmap_check(addr, len, flags) (0) +#endif + #endif /* __PARISC_MMAN_H__ */