termux-packages/packages/qemu-system-x86_64-headless/0010-fix-mman.h-defs.patch
2019-12-17 20:04:13 +02:00

208 lines
7.0 KiB
Diff

diff -uNr qemu-4.1.1/accel/tcg/translate-all.c qemu-4.1.1.mod/accel/tcg/translate-all.c
--- qemu-4.1.1/accel/tcg/translate-all.c 2019-11-14 20:06:20.000000000 +0200
+++ qemu-4.1.1.mod/accel/tcg/translate-all.c 2019-12-17 16:51:15.500204642 +0200
@@ -46,6 +46,8 @@
#include "exec/ram_addr.h"
#endif
+#include <linux/mman.h>
+
#include "exec/cputlb.h"
#include "exec/tb-hash.h"
#include "translate-all.h"
diff -uNr qemu-4.1.1/audio/ossaudio.c qemu-4.1.1.mod/audio/ossaudio.c
--- qemu-4.1.1/audio/ossaudio.c 2019-12-17 16:47:04.418010463 +0200
+++ qemu-4.1.1.mod/audio/ossaudio.c 2019-12-17 16:51:15.501204647 +0200
@@ -31,6 +31,8 @@
#include "audio.h"
#include "trace.h"
+#include <linux/mman.h>
+
#define AUDIO_CAP "oss"
#include "audio_int.h"
diff -uNr qemu-4.1.1/block/file-posix.c qemu-4.1.1.mod/block/file-posix.c
--- qemu-4.1.1/block/file-posix.c 2019-11-14 20:06:20.000000000 +0200
+++ qemu-4.1.1.mod/block/file-posix.c 2019-12-17 16:51:15.502204651 +0200
@@ -58,6 +58,7 @@
#include <sys/dkio.h>
#endif
#ifdef __linux__
+#include <linux/mman.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include <sys/syscall.h>
diff -uNr qemu-4.1.1/contrib/libvhost-user/libvhost-user.c qemu-4.1.1.mod/contrib/libvhost-user/libvhost-user.c
--- qemu-4.1.1/contrib/libvhost-user/libvhost-user.c 2019-11-14 20:06:20.000000000 +0200
+++ qemu-4.1.1.mod/contrib/libvhost-user/libvhost-user.c 2019-12-17 16:51:15.503204656 +0200
@@ -29,6 +29,7 @@
#include "qemu/compiler.h"
#if defined(__linux__)
+#include <linux/mman.h>
#include <sys/syscall.h>
#include <fcntl.h>
#include <sys/ioctl.h>
diff -uNr qemu-4.1.1/exec.c qemu-4.1.1.mod/exec.c
--- qemu-4.1.1/exec.c 2019-11-14 20:06:20.000000000 +0200
+++ qemu-4.1.1.mod/exec.c 2019-12-17 16:51:15.505204666 +0200
@@ -71,6 +71,7 @@
#include "qemu/range.h"
#ifndef _WIN32
#include "qemu/mmap-alloc.h"
+#include <linux/mman.h>
#endif
#include "monitor/monitor.h"
diff -uNr qemu-4.1.1/hw/vfio/common.c qemu-4.1.1.mod/hw/vfio/common.c
--- qemu-4.1.1/hw/vfio/common.c 2019-11-14 20:06:20.000000000 +0200
+++ qemu-4.1.1.mod/hw/vfio/common.c 2019-12-17 16:51:15.505204666 +0200
@@ -24,6 +24,7 @@
#include <linux/kvm.h>
#endif
#include <linux/vfio.h>
+#include <linux/mman.h>
#include "hw/vfio/vfio-common.h"
#include "hw/vfio/vfio.h"
diff -uNr qemu-4.1.1/hw/vfio/pci-quirks.c qemu-4.1.1.mod/hw/vfio/pci-quirks.c
--- qemu-4.1.1/hw/vfio/pci-quirks.c 2019-11-14 20:06:20.000000000 +0200
+++ qemu-4.1.1.mod/hw/vfio/pci-quirks.c 2019-12-17 16:51:15.506204671 +0200
@@ -23,6 +23,8 @@
#include "pci.h"
#include "trace.h"
+#include <linux/mman.h>
+
/* Use uin32_t for vendor & device so PCI_ANY_ID expands and cannot match hw */
static bool vfio_pci_is(VFIOPCIDevice *vdev, uint32_t vendor, uint32_t device)
{
diff -uNr qemu-4.1.1/hw/virtio/vhost-user.c qemu-4.1.1.mod/hw/virtio/vhost-user.c
--- qemu-4.1.1/hw/virtio/vhost-user.c 2019-11-14 20:06:20.000000000 +0200
+++ qemu-4.1.1.mod/hw/virtio/vhost-user.c 2019-12-17 16:51:15.506204671 +0200
@@ -31,6 +31,7 @@
#include "standard-headers/linux/vhost_types.h"
#ifdef CONFIG_LINUX
+#include <linux/mman.h>
#include <linux/userfaultfd.h>
#endif
diff -uNr qemu-4.1.1/linux-user/elfload.c qemu-4.1.1.mod/linux-user/elfload.c
--- qemu-4.1.1/linux-user/elfload.c 2019-12-17 16:48:45.801491837 +0200
+++ qemu-4.1.1.mod/linux-user/elfload.c 2019-12-17 16:51:15.507204675 +0200
@@ -2,6 +2,8 @@
#include "qemu/osdep.h"
#include <sys/param.h>
+#include <linux/mman.h>
+
#include <sys/resource.h>
#include <sys/shm.h>
diff -uNr qemu-4.1.1/linux-user/flatload.c qemu-4.1.1.mod/linux-user/flatload.c
--- qemu-4.1.1/linux-user/flatload.c 2019-11-14 20:06:20.000000000 +0200
+++ qemu-4.1.1.mod/linux-user/flatload.c 2019-12-17 16:57:00.426741291 +0200
@@ -35,6 +35,8 @@
#include "qemu/osdep.h"
+#include <linux/mman.h>
+
#include "qemu.h"
#include "flat.h"
#include <target_flat.h>
diff -uNr qemu-4.1.1/linux-user/i386/cpu_loop.c qemu-4.1.1.mod/linux-user/i386/cpu_loop.c
--- qemu-4.1.1/linux-user/i386/cpu_loop.c 2019-11-14 20:06:20.000000000 +0200
+++ qemu-4.1.1.mod/linux-user/i386/cpu_loop.c 2019-12-17 17:04:55.489657356 +0200
@@ -22,6 +22,8 @@
#include "qemu.h"
#include "cpu_loop-common.h"
+#include <linux/mman.h>
+
/***********************************************************/
/* CPUX86 core interface */
diff -uNr qemu-4.1.1/linux-user/mmap.c qemu-4.1.1.mod/linux-user/mmap.c
--- qemu-4.1.1/linux-user/mmap.c 2019-11-14 20:06:20.000000000 +0200
+++ qemu-4.1.1.mod/linux-user/mmap.c 2019-12-17 16:51:15.508204680 +0200
@@ -20,6 +20,8 @@
#include "qemu.h"
+#include <linux/mman.h>
+
//#define DEBUG_MMAP
static pthread_mutex_t mmap_mutex = PTHREAD_MUTEX_INITIALIZER;
diff -uNr qemu-4.1.1/linux-user/syscall.c qemu-4.1.1.mod/linux-user/syscall.c
--- qemu-4.1.1/linux-user/syscall.c 2019-12-17 16:48:07.277308780 +0200
+++ qemu-4.1.1.mod/linux-user/syscall.c 2019-12-17 16:51:15.510204690 +0200
@@ -34,6 +34,7 @@
#include <sys/resource.h>
#include <sys/swap.h>
#include <linux/capability.h>
+#include <linux/mman.h>
#include <sched.h>
#include <sys/timex.h>
#include <sys/socket.h>
diff -uNr qemu-4.1.1/migration/postcopy-ram.c qemu-4.1.1.mod/migration/postcopy-ram.c
--- qemu-4.1.1/migration/postcopy-ram.c 2019-11-14 20:06:20.000000000 +0200
+++ qemu-4.1.1.mod/migration/postcopy-ram.c 2019-12-17 16:51:15.511204694 +0200
@@ -31,6 +31,8 @@
#include "trace.h"
#include "hw/boards.h"
+#include <linux/mman.h>
+
/* Arbitrary limit on size of each discard command,
* keeps them around ~200 bytes
*/
diff -uNr qemu-4.1.1/util/memfd.c qemu-4.1.1.mod/util/memfd.c
--- qemu-4.1.1/util/memfd.c 2019-11-14 20:06:21.000000000 +0200
+++ qemu-4.1.1.mod/util/memfd.c 2019-12-17 16:51:15.512204699 +0200
@@ -32,6 +32,7 @@
#include "qemu/host-utils.h"
#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
+#include <linux/mman.h>
#include <sys/syscall.h>
#include <asm/unistd.h>
diff -uNr qemu-4.1.1/util/mmap-alloc.c qemu-4.1.1.mod/util/mmap-alloc.c
--- qemu-4.1.1/util/mmap-alloc.c 2019-11-14 20:06:21.000000000 +0200
+++ qemu-4.1.1.mod/util/mmap-alloc.c 2019-12-17 16:51:15.512204699 +0200
@@ -10,7 +10,7 @@
* later. See the COPYING file in the top-level directory.
*/
-#ifdef CONFIG_LINUX
+#ifdef __linux__
#include <linux/mman.h>
#else /* !CONFIG_LINUX */
#define MAP_SYNC 0x0
diff -uNr qemu-4.1.1/util/oslib-posix.c qemu-4.1.1.mod/util/oslib-posix.c
--- qemu-4.1.1/util/oslib-posix.c 2019-11-14 20:06:21.000000000 +0200
+++ qemu-4.1.1.mod/util/oslib-posix.c 2019-12-17 16:51:15.513204704 +0200
@@ -41,6 +41,7 @@
#include "qemu/cutils.h"
#ifdef CONFIG_LINUX
+#include <linux/mman.h>
#include <sys/syscall.h>
#endif
diff -uNr qemu-4.1.1/util/vfio-helpers.c qemu-4.1.1.mod/util/vfio-helpers.c
--- qemu-4.1.1/util/vfio-helpers.c 2019-11-14 20:06:21.000000000 +0200
+++ qemu-4.1.1.mod/util/vfio-helpers.c 2019-12-17 16:51:15.513204704 +0200
@@ -13,6 +13,7 @@
#include "qemu/osdep.h"
#include <sys/ioctl.h>
#include <linux/vfio.h>
+#include <linux/mman.h>
#include "qapi/error.h"
#include "exec/ramlist.h"
#include "exec/cpu-common.h"