Revision 45b35a5ced474b9fbbbfcfd5cf346c432d28d9fd authored by Ralf Baechle on 08 June 2006, 07:43:41 UTC, committed by Linus Torvalds on 08 June 2006, 22:12:21 UTC
From: Ralf Baechle <ralf@linux-mips.org>

<linux/mempolicy.h> uses struct mm_struct and relies on a definition or
declaration somehow magically being dragged in which may result in a
build:

[...]
  CC      mm/mempolicy.o
In file included from mm/mempolicy.c:69:
include/linux/mempolicy.h:150: warning: ‘struct mm_struct’ declared inside parameter list
include/linux/mempolicy.h:150: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/mempolicy.h:175: warning: ‘struct mm_struct’ declared inside parameter list
mm/mempolicy.c:622: error: conflicting types for ‘do_migrate_pages’
include/linux/mempolicy.h:175: error: previous declaration of ‘do_migrate_pages’ was here
mm/mempolicy.c:1661: error: conflicting types for ‘mpol_rebind_mm’
include/linux/mempolicy.h:150: error: previous declaration of ‘mpol_rebind_mm’ was here
make[1]: *** [mm/mempolicy.o] Error 1
make: *** [mm] Error 2
[ralf@denk linux-ip35]$

Including <linux/sched.h> is a step into direction of include hell so
fixed by adding a forward declaration of struct mm_struct instead.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent fd0a0ac
History
File Mode Size
basic
genksyms
kconfig
ksymoops
mod
package
.gitignore -rw-r--r-- 59 bytes
Kbuild.include -rw-r--r-- 5.1 KB
Lindent -rwxr-xr-x 60 bytes
Makefile -rw-r--r-- 792 bytes
Makefile.build -rw-r--r-- 10.1 KB
Makefile.clean -rw-r--r-- 3.2 KB
Makefile.host -rw-r--r-- 5.8 KB
Makefile.lib -rw-r--r-- 6.4 KB
Makefile.modinst -rw-r--r-- 991 bytes
Makefile.modpost -rw-r--r-- 3.7 KB
bin2c.c -rw-r--r-- 702 bytes
binoffset.c -rw-r--r-- 3.9 KB
bloat-o-meter -rwxr-xr-x 1.5 KB
checkincludes.pl -rwxr-xr-x 529 bytes
checkstack.pl -rwxr-xr-x 3.5 KB
checkversion.pl -rwxr-xr-x 1.9 KB
conmakehash.c -rw-r--r-- 6.0 KB
extract-ikconfig -rwxr-xr-x 1.7 KB
gcc-version.sh -rw-r--r-- 338 bytes
gen_initramfs_list.sh -rw-r--r-- 6.4 KB
kallsyms.c -rw-r--r-- 12.0 KB
kernel-doc -rwxr-xr-x 50.4 KB
makelst -rwxr-xr-x 941 bytes
mkcompile_h -rwxr-xr-x 2.3 KB
mkmakefile -rw-r--r-- 742 bytes
mksysmap -rw-r--r-- 1.3 KB
mkuboot.sh -rwxr-xr-x 293 bytes
mkversion -rw-r--r-- 74 bytes
namespace.pl -rwxr-xr-x 13.1 KB
patch-kernel -rwxr-xr-x 9.7 KB
pnmtologo.c -rw-r--r-- 11.7 KB
profile2linkerlist.pl -rw-r--r-- 378 bytes
setlocalversion -rw-r--r-- 486 bytes
show_delta -rwxr-xr-x 3.0 KB
ver_linux -rwxr-xr-x 3.1 KB

back to top