18 lines
658 B
Diff
18 lines
658 B
Diff
|
diff -uNr qemu-4.0.0/tcg/i386/tcg-target.inc.c qemu-4.0.0.mod/tcg/i386/tcg-target.inc.c
|
||
|
--- qemu-4.0.0/tcg/i386/tcg-target.inc.c 2019-04-23 21:14:46.000000000 +0300
|
||
|
+++ qemu-4.0.0.mod/tcg/i386/tcg-target.inc.c 2019-04-27 03:36:23.678807870 +0300
|
||
|
@@ -1888,7 +1888,12 @@
|
||
|
# if defined(__x86_64__) && defined(__linux__)
|
||
|
# include <asm/prctl.h>
|
||
|
# include <sys/prctl.h>
|
||
|
-int arch_prctl(int code, unsigned long addr);
|
||
|
+# include <linux/unistd.h>
|
||
|
+static int arch_prctl(int code, unsigned long addr)
|
||
|
+{
|
||
|
+ return syscall(__NR_arch_prctl, code, addr);
|
||
|
+}
|
||
|
+
|
||
|
static inline int setup_guest_base_seg(void)
|
||
|
{
|
||
|
if (arch_prctl(ARCH_SET_GS, guest_base) == 0) {
|