kqemu: added patch for kernel >= 2.6.23

This commit is contained in:
Simone Rota 2007-10-20 03:07:51 +02:00
parent 2280d33eb7
commit f8a085ba96
3 changed files with 33 additions and 2 deletions

View File

@ -1 +1,2 @@
970521874ef8b1ba4598925ace5936c3 kqemu-1.3.0pre11.tar.gz
ccb8569947d23c4bf3cbc07592ec2161 kqemu.patch

View File

@ -6,8 +6,9 @@
name=kqemu
version=1.3.0pre11
release=1
source=(http://fabrice.bellard.free.fr/qemu/$name-$version.tar.gz)
release=2
source=(http://fabrice.bellard.free.fr/qemu/$name-$version.tar.gz \
$name.patch)
build() {
cd $name-$version

29
kqemu/kqemu.patch Normal file
View File

@ -0,0 +1,29 @@
diff -ru kqemu-1.3.0pre11.orig/kqemu-linux.c kqemu-1.3.0pre11/kqemu-linux.c
--- kqemu-1.3.0pre11.orig/kqemu-linux.c 2007-02-06 22:02:00.000000000 +0100
+++ kqemu-1.3.0pre11/kqemu-linux.c 2007-10-19 13:45:18.004789125 +0200
@@ -26,6 +26,11 @@
#include <linux/ioctl.h>
#include <linux/smp_lock.h>
#include <linux/miscdevice.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
+#include <linux/sched.h>
+#endif
+
#include <asm/atomic.h>
#include <asm/processor.h>
#include <asm/uaccess.h>
@@ -78,7 +83,12 @@
int ret;
struct page *page;
- ret = get_user_pages(current, current->mm,
+ ret = get_user_pages(current,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
+ current->mm,
+#else
+ get_task_mm(current),
+#endif
user_addr,
1, /* 1 page. */
1, /* 'write': intent to write. */