termux-packages/packages/qemu-system-x86_64-headless/0003-add-missing-arch_prctl...

18 lines
658 B
Diff
Raw Normal View History

2019-12-17 13:54:39 +01:00
diff -uNr qemu-4.2.0/tcg/i386/tcg-target.inc.c qemu-4.2.0.mod/tcg/i386/tcg-target.inc.c
--- qemu-4.2.0/tcg/i386/tcg-target.inc.c 2019-12-12 20:20:48.000000000 +0200
+++ qemu-4.2.0.mod/tcg/i386/tcg-target.inc.c 2019-12-15 00:06:29.506302636 +0200
@@ -1968,7 +1968,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) {