Commit 73bdea1951ce3894826907a6ce0cf68ad5e4dd0c

Authored by bellard
1 parent 00af2b26

2.6 kernel compile fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@654 c046a42c-6fe2-441c-8c8c-71466251a162
target-i386/helper2.c
... ... @@ -34,9 +34,14 @@
34 34 #ifdef USE_CODE_COPY
35 35 #include <asm/ldt.h>
36 36 #include <linux/unistd.h>
  37 +#include <linux/version.h>
37 38  
38 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 43 #endif
  44 +#endif /* USE_CODE_COPY */
40 45  
41 46 CPUX86State *cpu_x86_init(void)
42 47 {
... ...
tests/test-i386.c
... ... @@ -884,9 +884,14 @@ void test_xchg(void)
884 884  
885 885 #include <asm/ldt.h>
886 886 #include <linux/unistd.h>
  887 +#include <linux/version.h>
887 888  
888 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 895 uint8_t seg_data1[4096];
891 896 uint8_t seg_data2[4096];
892 897  
... ...