Skip to contentSkip to conversation

Fix compile errors with 2.6.11-rc2

PATCH New Manish Lachwani 1 participant 1 message Jan 28, 2005 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix compile errors with 2.6.11-rc2

Hi !

When compiling 2.6.11-rc2:

...

CC kernel/stop_machine.o
In file included from include/linux/sysdev.h:24,
from include/linux/cpu.h:22,
from include/linux/stop_machine.h:8,
from kernel/stop_machine.c:1:
include/linux/kobject.h: In function `to_kset':
include/linux/kobject.h:116: warning: implicit declaration of function `container_of' include/linux/kobject.h:116: error: parse error before "struct" include/linux/kobject.h:117: warning: no return statement in function returning non-void include/linux/kobject.h: In function `subsys_get':
include/linux/kobject.h:224: error: parse error before "struct" include/linux/kobject.h:225: warning: no return statement in function returning non-void make[1]: *** [kernel/stop_machine.o] Error 1
make: *** [kernel] Error 2

Attached patch fixes this.

Thanks
Manish Lachwani

include/linux/kobject.h +1 -0
Index: linux-2.6.11-rc2/include/linux/kobject.h
===================================================================
@@ -23,6 +23,7 @@
 #include <linux/rwsem.h>
 #include <linux/kref.h>
 #include <linux/kobject_uevent.h>
+#include <linux/kernel.h>
 #include <asm/atomic.h>
 
 #define KOBJ_NAME_LEN	20