From: David Woodhouse Date: Tue, 25 Apr 2006 13:18:07 +0000 (+0100) Subject: Sanitise linux/mman.h for userspace consumption X-Git-Tag: v2.6.18-rc1~1103^2~57 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cdcb56636717ccb935dc66c5d56681eaa5941c1;p=linux-2.6 Sanitise linux/mman.h for userspace consumption It only really needs to define a few constants and include when it's used by userspace. Move the rest within #ifdef __KERNEL__ Signed-off-by: David Woodhouse --- diff --git a/include/linux/mman.h b/include/linux/mman.h index 18a5689ef7..4ad21c5863 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h @@ -1,10 +1,6 @@ #ifndef _LINUX_MMAN_H #define _LINUX_MMAN_H -#include -#include - -#include #include #define MREMAP_MAYMOVE 1 @@ -13,6 +9,13 @@ #define OVERCOMMIT_GUESS 0 #define OVERCOMMIT_ALWAYS 1 #define OVERCOMMIT_NEVER 2 + +#ifdef __KERNEL__ +#include +#include + +#include + extern int sysctl_overcommit_memory; extern int sysctl_overcommit_ratio; extern atomic_t vm_committed_space; @@ -63,5 +66,5 @@ calc_vm_flag_bits(unsigned long flags) _calc_vm_trans(flags, MAP_EXECUTABLE, VM_EXECUTABLE) | _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); } - +#endif /* __KERNEL__ */ #endif /* _LINUX_MMAN_H */