[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Remove abuse of kernel headers.
From: |
David Woodhouse |
Subject: |
Re: [Qemu-devel] [PATCH] Remove abuse of kernel headers. |
Date: |
Thu, 08 Jun 2006 11:20:34 +0100 |
On Wed, 2006-06-07 at 23:12 +0100, David Woodhouse wrote:
> The _syscallX() macros in the kernel's private headers are not suitable
> for use in userspace. This patch switches from abusing those to using
> the syscall() function which glibc provides.
One more instance...
--- qemu-0.8.1/target-i386/helper2.c.orig 2006-06-08 11:09:41.000000000
+0100
+++ qemu-0.8.1/target-i386/helper2.c 2006-06-08 11:10:30.000000000 +0100
@@ -35,7 +35,10 @@
#include <linux/unistd.h>
#include <linux/version.h>
-_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
+int modify_ldt(int func, void *ptr, unsigned long bytecount)
+{
+ return syscall(__NR_modify_ldt, func, ptr, bytecount);
+}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 66)
#define modify_ldt_ldt_s user_desc
--
dwmw2