30 lines
933 B
Diff
30 lines
933 B
Diff
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. */
|