[root@dragon vmmon-only]# vi Makefile.kernel [root@dragon vmmon-only]# make Using 2.6.x kernel build system. cc -Wall -Wstrict-prototypes -DVMW_USING_KBUILD -DVMMON -DVMCORE -I./include -I./common -I./linux -I./vmcore -Iinclude2/asm/mach-default -DKBUILD_BASENAME="vmmon" -Wno-unused -Werror -S -o /dev/null -xc ./autoconf/nopage1.c In file included from /usr/include/linux/sched.h:20, from /usr/include/linux/mm.h:4, from ./autoconf/nopage1.c:1: /usr/include/asm/semaphore.h:46: error: expected specifier-qualifier-list before ‘wait_queue_head_t’ /usr/include/asm/semaphore.h: In function ‘sema_init’: /usr/include/asm/semaphore.h:73: error: ‘struct semaphore’ has no member named ‘wait’ /usr/include/asm/semaphore.h: In function ‘down’: /usr/include/asm/semaphore.h:106: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ /usr/include/asm/semaphore.h: In function ‘down_interruptible’: /usr/include/asm/semaphore.h:133: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ /usr/include/asm/semaphore.h: In function ‘down_trylock’: /usr/include/asm/semaphore.h:158: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ /usr/include/asm/semaphore.h: In function ‘up’: /usr/include/asm/semaphore.h:182: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ In file included from /usr/include/asm/siginfo.h:4, from /usr/include/linux/signal.h:7, from /usr/include/linux/sched.h:28, from /usr/include/linux/mm.h:4, from ./autoconf/nopage1.c:1: /usr/include/asm-generic/siginfo.h: At top level: /usr/include/asm-generic/siginfo.h:60: error: size of array ‘_pad’ is too large In file included from /usr/include/linux/sched.h:32, from /usr/include/linux/mm.h:4, from ./autoconf/nopage1.c:1: /usr/include/linux/completion.h:15: error: expected specifier-qualifier-list before ‘wait_queue_head_t’ /usr/include/linux/completion.h: In function ‘init_completion’: /usr/include/linux/completion.h:27: error: ‘struct completion’ has no member named ‘wait’ ./autoconf/nopage1.c: In function ‘LinuxDriverNoPage’: ./autoconf/nopage1.c:7: error: ‘VM_FAULT_MAJOR’ undeclared (first use in this function) ./autoconf/nopage1.c:7: error: (Each undeclared identifier is reported only once ./autoconf/nopage1.c:7: error: for each function it appears in.) ./autoconf/nopage1.c: At top level: ./autoconf/nopage1.c:11: error: variable ‘vmuser_mops’ has initializer but incomplete type ./autoconf/nopage1.c:12: error: unknown field ‘nopage’ specified in initializer cc1: warnings being treated as errors ./autoconf/nopage1.c:13: warning: excess elements in struct initializer ./autoconf/nopage1.c:13: warning: (near initialization for ‘vmuser_mops’) false cc -Wall -Wstrict-prototypes -DVMW_USING_KBUILD -DVMMON -DVMCORE -I./include -I./common -I./linux -I./vmcore -Iinclude2/asm/mach-default -DKBUILD_BASENAME="vmmon" -Wno-unused -Werror -S -o /dev/null -xc ./autoconf/skas1.c In file included from /usr/include/linux/sched.h:20, from /usr/include/linux/mm.h:4, from ./autoconf/skas1.c:5: /usr/include/asm/semaphore.h:46: error: expected specifier-qualifier-list before ‘wait_queue_head_t’ /usr/include/asm/semaphore.h: In function ‘sema_init’: /usr/include/asm/semaphore.h:73: error: ‘struct semaphore’ has no member named ‘wait’ /usr/include/asm/semaphore.h: In function ‘down’: /usr/include/asm/semaphore.h:106: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ /usr/include/asm/semaphore.h: In function ‘down_interruptible’: /usr/include/asm/semaphore.h:133: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ /usr/include/asm/semaphore.h: In function ‘down_trylock’: /usr/include/asm/semaphore.h:158: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ /usr/include/asm/semaphore.h: In function ‘up’: /usr/include/asm/semaphore.h:182: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ In file included from /usr/include/asm/siginfo.h:4, from /usr/include/linux/signal.h:7, from /usr/include/linux/sched.h:28, from /usr/include/linux/mm.h:4, from ./autoconf/skas1.c:5: /usr/include/asm-generic/siginfo.h: At top level: /usr/include/asm-generic/siginfo.h:60: error: size of array ‘_pad’ is too large In file included from /usr/include/linux/sched.h:32, from /usr/include/linux/mm.h:4, from ./autoconf/skas1.c:5: /usr/include/linux/completion.h:15: error: expected specifier-qualifier-list before ‘wait_queue_head_t’ /usr/include/linux/completion.h: In function ‘init_completion’: /usr/include/linux/completion.h:27: error: ‘struct completion’ has no member named ‘wait’ cc1: warnings being treated as errors ./autoconf/skas1.c: At top level: ./autoconf/skas1.c:10: warning: ‘struct file’ declared inside parameter list ./autoconf/skas1.c:10: warning: its scope is only this definition or declaration, which is probably not what you want ./autoconf/skas1.c: In function ‘check_do_mmap_pgoff’: ./autoconf/skas1.c:11: warning: implicit declaration of function ‘do_mmap_pgoff’ false cc -Wall -Wstrict-prototypes -DVMW_USING_KBUILD -DVMMON -DVMCORE -I./include -I./common -I./linux -I./vmcore -Iinclude2/asm/mach-default -DKBUILD_BASENAME="vmmon" -Wno-unused -Werror -S -o /dev/null -xc ./autoconf/epoll.c ./autoconf/epoll.c: In function ‘poll_test’: ./autoconf/epoll.c:8: error: storage size of ‘test’ isn’t known cc1: warnings being treated as errors ./autoconf/epoll.c:10: warning: implicit declaration of function ‘poll_initwait’ ./autoconf/epoll.c:10: warning: ‘return’ with a value, in function returning void false cc -Wall -Wstrict-prototypes -DVMW_USING_KBUILD -DVMMON -DVMCORE -I./include -I./common -I./linux -I./vmcore -Iinclude2/asm/mach-default -DKBUILD_BASENAME="vmmon" -Wno-unused -Werror -S -o /dev/null -xc ./autoconf/setnice.c In file included from /usr/include/linux/sched.h:20, from ./autoconf/setnice.c:1: /usr/include/asm/semaphore.h:46: error: expected specifier-qualifier-list before ‘wait_queue_head_t’ /usr/include/asm/semaphore.h: In function ‘sema_init’: /usr/include/asm/semaphore.h:73: error: ‘struct semaphore’ has no member named ‘wait’ /usr/include/asm/semaphore.h: In function ‘down’: /usr/include/asm/semaphore.h:106: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ /usr/include/asm/semaphore.h: In function ‘down_interruptible’: /usr/include/asm/semaphore.h:133: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ /usr/include/asm/semaphore.h: In function ‘down_trylock’: /usr/include/asm/semaphore.h:158: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ /usr/include/asm/semaphore.h: In function ‘up’: /usr/include/asm/semaphore.h:182: error: expected ‘:’ or ‘)’ before ‘LOCK_SECTION_START’ In file included from /usr/include/asm/siginfo.h:4, from /usr/include/linux/signal.h:7, from /usr/include/linux/sched.h:28, from ./autoconf/setnice.c:1: /usr/include/asm-generic/siginfo.h: At top level: /usr/include/asm-generic/siginfo.h:60: error: size of array ‘_pad’ is too large In file included from /usr/include/linux/sched.h:32, from ./autoconf/setnice.c:1: /usr/include/linux/completion.h:15: error: expected specifier-qualifier-list before ‘wait_queue_head_t’ /usr/include/linux/completion.h: In function ‘init_completion’: /usr/include/linux/completion.h:27: error: ‘struct completion’ has no member named ‘wait’ cc1: warnings being treated as errors ./autoconf/setnice.c: In function ‘test’: ./autoconf/setnice.c:4: warning: implicit declaration of function ‘set_user_nice’ ./autoconf/setnice.c:4: error: ‘current’ undeclared (first use in this function) ./autoconf/setnice.c:4: error: (Each undeclared identifier is reported only once ./autoconf/setnice.c:4: error: for each function it appears in.) false make -C /lib/modules/2.6.16-026test017/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: Entering directory `/usr/src/linux-2.6.16-openvz-026.017' gcc -m32 -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -march=k8 -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wstrict-prototypes -DVMW_USING_KBUILD -DVMMON -DVMCORE -I/upgrade/test/vmmon-only/./include -I/upgrade/test/vmmon-only/./common -I/upgrade/test/vmmon-only/./linux -I/upgrade/test/vmmon-only/./vmcore -Iinclude2/asm/mach-default -DKBUILD_BASENAME="vmmon" -Wno-unused -Werror -S -o /dev/null -xc /upgrade/test/vmmon-only/./autoconf/nopage1.c cc1: warnings being treated as errors In file included from include/linux/sched.h:12, from include/linux/mm.h:4, from /upgrade/test/vmmon-only/./autoconf/nopage1.c:1: include/linux/jiffies.h: In function ‘clock_t_to_jiffies’: include/linux/jiffies.h:397: warning: ISO C90 forbids mixed declarations and code false gcc -m32 -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -march=k8 -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wstrict-prototypes -DVMW_USING_KBUILD -DVMMON -DVMCORE -I/upgrade/test/vmmon-only/./include -I/upgrade/test/vmmon-only/./common -I/upgrade/test/vmmon-only/./linux -I/upgrade/test/vmmon-only/./vmcore -Iinclude2/asm/mach-default -DKBUILD_BASENAME="vmmon" -Wno-unused -Werror -S -o /dev/null -xc /upgrade/test/vmmon-only/./autoconf/skas1.c cc1: warnings being treated as errors In file included from include/linux/sched.h:12, from include/linux/mm.h:4, from /upgrade/test/vmmon-only/./autoconf/skas1.c:5: include/linux/jiffies.h: In function ‘clock_t_to_jiffies’: include/linux/jiffies.h:397: warning: ISO C90 forbids mixed declarations and code /upgrade/test/vmmon-only/./autoconf/skas1.c: In function ‘check_do_mmap_pgoff’: /upgrade/test/vmmon-only/./autoconf/skas1.c:11: warning: passing argument 1 of ‘do_mmap_pgoff’ from incompatible pointer type /upgrade/test/vmmon-only/./autoconf/skas1.c:11: warning: passing argument 2 of ‘do_mmap_pgoff’ makes integer from pointer without a cast /upgrade/test/vmmon-only/./autoconf/skas1.c:11: error: too many arguments to function ‘do_mmap_pgoff’ false gcc -m32 -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -march=k8 -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wstrict-prototypes -DVMW_USING_KBUILD -DVMMON -DVMCORE -I/upgrade/test/vmmon-only/./include -I/upgrade/test/vmmon-only/./common -I/upgrade/test/vmmon-only/./linux -I/upgrade/test/vmmon-only/./vmcore -Iinclude2/asm/mach-default -DKBUILD_BASENAME="vmmon" -Wno-unused -Werror -S -o /dev/null -xc /upgrade/test/vmmon-only/./autoconf/epoll.c cc1: warnings being treated as errors In file included from include/linux/sched.h:12, from include/linux/mm.h:4, from include/linux/poll.h:11, from /upgrade/test/vmmon-only/./autoconf/epoll.c:5: include/linux/jiffies.h: In function ‘clock_t_to_jiffies’: include/linux/jiffies.h:397: warning: ISO C90 forbids mixed declarations and code false gcc -m32 -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -march=k8 -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wstrict-prototypes -DVMW_USING_KBUILD -DVMMON -DVMCORE -I/upgrade/test/vmmon-only/./include -I/upgrade/test/vmmon-only/./common -I/upgrade/test/vmmon-only/./linux -I/upgrade/test/vmmon-only/./vmcore -Iinclude2/asm/mach-default -DKBUILD_BASENAME="vmmon" -Wno-unused -Werror -S -o /dev/null -xc /upgrade/test/vmmon-only/./autoconf/setnice.c cc1: warnings being treated as errors In file included from include/linux/sched.h:12, from /upgrade/test/vmmon-only/./autoconf/setnice.c:1: include/linux/jiffies.h: In function ‘clock_t_to_jiffies’: include/linux/jiffies.h:397: warning: ISO C90 forbids mixed declarations and code false CC [M] /upgrade/test/vmmon-only/linux/driver.o In file included from include/linux/sched.h:12, from include/linux/module.h:10, from /upgrade/test/vmmon-only/linux/driver.c:12: include/linux/jiffies.h: In function ‘clock_t_to_jiffies’: include/linux/jiffies.h:397: warning: ISO C90 forbids mixed declarations and code In file included from /upgrade/test/vmmon-only/linux/driver.h:20, from /upgrade/test/vmmon-only/linux/driver.c:49: /upgrade/test/vmmon-only/./include/compat_wait.h:37:5: warning: "VMW_HAVE_EPOLL" is not defined /upgrade/test/vmmon-only/./include/compat_wait.h:43:5: warning: "VMW_HAVE_EPOLL" is not defined In file included from /upgrade/test/vmmon-only/linux/driver.h:20, from /upgrade/test/vmmon-only/linux/driver.c:49: /upgrade/test/vmmon-only/./include/compat_wait.h: At top level: /upgrade/test/vmmon-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’ include/linux/poll.h:45: error: previous declaration of ‘poll_initwait’ was here /upgrade/test/vmmon-only/linux/driver.c:145: warning: initialization from incompatible pointer type /upgrade/test/vmmon-only/linux/driver.c:149: warning: initialization from incompatible pointer type make[2]: *** [/upgrade/test/vmmon-only/linux/driver.o] Error 1 make[1]: *** [_module_/upgrade/test/vmmon-only] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.16-openvz-026.017' make: *** [vmmon.ko] Error 2