qemu: re-add patch for missing arch_prctl() - needed for x86 builds

This commit is contained in:
Leonid Pliushch 2020-12-11 14:49:17 +02:00
parent a69aeaba1c
commit 291f7bc9e1
No known key found for this signature in database
GPG Key ID: 45F2964132545795
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
--- qemu-4.2.0/tcg/i386/tcg-target.c.inc
+++ qemu-4.2.0.mod/tcg/i386/tcg-target.c.inc
@@ -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) {