qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [patch] kqemu-1.4.0pre1: insert missing include linux/sched.h
@ 2008-10-11 10:29 Stan Behrens
  0 siblings, 0 replies; only message in thread
From: Stan Behrens @ 2008-10-11 10:29 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2094 bytes --]

Hi,

if you try to build kqemu-1.4.0pre1 against linux-kernel (I tried 2.6.25.17 and 2.6.26.6), you get this error:

 > $ tar xzf kqemu-1.4.0pre1.tar.gz
 > $ cd kqemu-1.4.0pre1
 > $ ./configure && make
 >   [...]
 > make[1]: Entering directory `/usr/src/linux-2.6.26.6'
 >   CC [M]  /home/sbeh/source/kqemu-1.4.0pre1/kqemu-linux.o
 > /home/sbeh/source/kqemu-1.4.0pre1/kqemu-linux.c: In function ‘kqemu_lock_user_page’:
 > /home/sbeh/source/kqemu-1.4.0pre1/kqemu-linux.c:81: error: dereferencing pointer to incomplete type
 > /home/sbeh/source/kqemu-1.4.0pre1/kqemu-linux.c: In function ‘kqemu_schedule’:
 > /home/sbeh/source/kqemu-1.4.0pre1/kqemu-linux.c:194: error: implicit declaration of function ‘need_resched’
 > /home/sbeh/source/kqemu-1.4.0pre1/kqemu-linux.c:195: error: implicit declaration of function ‘schedule’
 > /home/sbeh/source/kqemu-1.4.0pre1/kqemu-linux.c:197: error: implicit declaration of function ‘signal_pending’
 > make[2]: *** [/home/sbeh/source/kqemu-1.4.0pre1/kqemu-linux.o] Error 1
 > make[1]: *** [_module_/home/sbeh/source/kqemu-1.4.0pre1] Error 2
 > make[1]: Leaving directory `/usr/src/linux-2.6.26.6'
 > make: *** [kqemu.ko] Error 2

Applying the attached patch fixes this.
 > $ patch <../kqemu-insert-linux-sched-header.patch
 > patching file kqemu-linux.c
 > $ make
 > make -C common all
 > make[1]: Entering directory `/home/sbeh/source/kqemu-1.4.0pre1/common'
 > make[1]: Nothing to be done for `all'.
 > make[1]: Leaving directory `/home/sbeh/source/kqemu-1.4.0pre1/common'
 > make -C /lib/modules/2.6.26.6/build M=`pwd` modules
 > make[1]: Entering directory `/usr/src/linux-2.6.26.6'
 >   CC [M]  /home/sbeh/source/kqemu-1.4.0pre1/kqemu-linux.o
 > cp /home/sbeh/source/kqemu-1.4.0pre1/kqemu-mod-i386.o /home/sbeh/source/kqemu-1.4.0pre1/kqemu-mod.o
 >   LD [M]  /home/sbeh/source/kqemu-1.4.0pre1/kqemu.o
 >   Building modules, stage 2.
 >   MODPOST 1 modules
 >   CC      /home/sbeh/source/kqemu-1.4.0pre1/kqemu.mod.o
 >   LD [M]  /home/sbeh/source/kqemu-1.4.0pre1/kqemu.ko
 > make[1]: Leaving directory `/usr/src/linux-2.6.26.6'

Bye.

[-- Attachment #2: kqemu-insert-linux-sched-header.patch --]
[-- Type: text/plain, Size: 328 bytes --]

--- kqemu-linux.c.orig    2008-05-30 22:33:34.000000000 +0200
+++ kqemu-linux.c    2008-10-11 10:32:12.000000000 +0200
@@ -26,6 +26,7 @@
 #include <linux/ioctl.h>
 #include <linux/smp_lock.h>
 #include <linux/miscdevice.h>
+#include <linux/sched.h>
 #include <asm/atomic.h>
 #include <asm/processor.h>
 #include <asm/uaccess.h>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-11 10:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-11 10:29 [Qemu-devel] [patch] kqemu-1.4.0pre1: insert missing include linux/sched.h Stan Behrens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).