On Monday 16 January 2006 18:14, Olaf Hering wrote:
> Current Linus tree does not compile for me:
>
>
> girgendwas:~/linux-2.6.15$ gcc -Wp,-MD,arch/um/drivers/.chan_user.o.d -Wall
> -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
> -ffreestanding -Os -fomit-frame-pointer -D__arch_um__ -DSUBARCH=\"i386\"
> -Dvmap=kernel_vmap -Din6addr_loopback=kernel_in6addr_loopback
> -Iarch/um/include  -I/home/abuild/linux-2.6.15/arch/um/kernel/skas/include
> -D_FILE_OFFSET_BITS=64 -march=i686 -mpreferred-stack-boundary=2
> -D_GNU_SOURCE -D_LARGEFILE64_SOURCE  -c -o arch/um/drivers/chan_user.o
> arch/um/drivers/chan_user.c --save-temps In file included from
> arch/um/drivers/chan_user.c:16:
> arch/um/include/kern_util.h:35: error: 'CONFIG_NR_CPUS' undeclared here
> (not in a function)
>
> It picks up the libc headers instead of the 2.6.15 ones.
Yep, that's correct, the bug is that shouldn't be using CONFIG_NR_CPUS.
> grep -E '^#[[:blank:]]+[[:digit:]]' chan_user.i

Disable CONFIG_SMP, it doesn't work well anyway, however thanks for the 
report.

-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
Index: linux-2.6.git/arch/um/include/kern_util.h
===================================================================
--- linux-2.6.git.orig/arch/um/include/kern_util.h
+++ linux-2.6.git/arch/um/include/kern_util.h
@@ -31,8 +31,6 @@ extern int timer_irq_inited;
 extern int jail;
 extern int nsyscalls;
 
-extern struct task_struct *idle_threads[NR_CPUS];
-
 #define UML_ROUND_DOWN(addr) ((void *)(((unsigned long) addr) & PAGE_MASK))
 #define UML_ROUND_UP(addr) \
 	UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1)
Index: linux-2.6.git/arch/um/kernel/reboot.c
===================================================================
--- linux-2.6.git.orig/arch/um/kernel/reboot.c
+++ linux-2.6.git/arch/um/kernel/reboot.c
@@ -5,6 +5,7 @@
 
 #include "linux/module.h"
 #include "linux/sched.h"
+#include "asm/smp.h"
 #include "user_util.h"
 #include "kern_util.h"
 #include "kern.h"
Index: linux-2.6.git/include/asm-um/smp.h
===================================================================
--- linux-2.6.git.orig/include/asm-um/smp.h
+++ linux-2.6.git/include/asm-um/smp.h
@@ -23,6 +23,8 @@ extern inline void smp_cpus_done(unsigne
 {
 }
 
+extern struct task_struct *idle_threads[NR_CPUS];
+
 #endif
 
 #endif

Reply via email to