]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
2.6 kernel compile fix
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 4 Mar 2004 22:50:52 +0000 (22:50 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 4 Mar 2004 22:50:52 +0000 (22:50 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@654 c046a42c-6fe2-441c-8c8c-71466251a162

target-i386/helper2.c
tests/test-i386.c

index c98262c2d3c47cdf290110e25d2f504e47d6e81b..c9c9d7e36e9ad3789e17914df7095097682d981b 100644 (file)
 #ifdef USE_CODE_COPY
 #include <asm/ldt.h>
 #include <linux/unistd.h>
+#include <linux/version.h>
 
 _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 66)
+#define modify_ldt_ldt_s user_desc
 #endif
+#endif /* USE_CODE_COPY */
 
 CPUX86State *cpu_x86_init(void)
 {
index 650a5a96abd5a26a9f62b527c7c20279e1329266..ce1213a7d25f80686b9f33459c09a88e0aa0fc5d 100644 (file)
@@ -884,9 +884,14 @@ void test_xchg(void)
 
 #include <asm/ldt.h>
 #include <linux/unistd.h>
+#include <linux/version.h>
 
 _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 66)
+#define modify_ldt_ldt_s user_desc
+#endif
+
 uint8_t seg_data1[4096];
 uint8_t seg_data2[4096];