diff options
-rw-r--r-- | target-i386/helper2.c | 5 | ||||
-rw-r--r-- | tests/test-i386.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/target-i386/helper2.c b/target-i386/helper2.c index c98262c2d3..c9c9d7e36e 100644 --- a/target-i386/helper2.c +++ b/target-i386/helper2.c @@ -34,9 +34,14 @@ #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) { diff --git a/tests/test-i386.c b/tests/test-i386.c index 650a5a96ab..ce1213a7d2 100644 --- a/tests/test-i386.c +++ b/tests/test-i386.c @@ -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]; |