Commit 73bdea1951ce3894826907a6ce0cf68ad5e4dd0c
1 parent
00af2b26
2.6 kernel compile fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@654 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
10 additions
and
0 deletions
target-i386/helper2.c
| @@ -34,9 +34,14 @@ | @@ -34,9 +34,14 @@ | ||
| 34 | #ifdef USE_CODE_COPY | 34 | #ifdef USE_CODE_COPY |
| 35 | #include <asm/ldt.h> | 35 | #include <asm/ldt.h> |
| 36 | #include <linux/unistd.h> | 36 | #include <linux/unistd.h> |
| 37 | +#include <linux/version.h> | ||
| 37 | 38 | ||
| 38 | _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount) | 39 | _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount) |
| 40 | + | ||
| 41 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 66) | ||
| 42 | +#define modify_ldt_ldt_s user_desc | ||
| 39 | #endif | 43 | #endif |
| 44 | +#endif /* USE_CODE_COPY */ | ||
| 40 | 45 | ||
| 41 | CPUX86State *cpu_x86_init(void) | 46 | CPUX86State *cpu_x86_init(void) |
| 42 | { | 47 | { |
tests/test-i386.c
| @@ -884,9 +884,14 @@ void test_xchg(void) | @@ -884,9 +884,14 @@ void test_xchg(void) | ||
| 884 | 884 | ||
| 885 | #include <asm/ldt.h> | 885 | #include <asm/ldt.h> |
| 886 | #include <linux/unistd.h> | 886 | #include <linux/unistd.h> |
| 887 | +#include <linux/version.h> | ||
| 887 | 888 | ||
| 888 | _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount) | 889 | _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount) |
| 889 | 890 | ||
| 891 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 66) | ||
| 892 | +#define modify_ldt_ldt_s user_desc | ||
| 893 | +#endif | ||
| 894 | + | ||
| 890 | uint8_t seg_data1[4096]; | 895 | uint8_t seg_data1[4096]; |
| 891 | uint8_t seg_data2[4096]; | 896 | uint8_t seg_data2[4096]; |
| 892 | 897 |