termux-packages/packages/qemu-system-x86-64-headless/0009-fix-mman.h-defs.patch

254 lines
8.7 KiB
Diff

diff -uNr qemu-6.1.0/accel/tcg/translate-all.c qemu-6.1.0.mod/accel/tcg/translate-all.c
--- qemu-6.1.0/accel/tcg/translate-all.c 2021-08-24 20:35:40.000000000 +0300
+++ qemu-6.1.0.mod/accel/tcg/translate-all.c 2021-08-25 18:17:55.882330894 +0300
@@ -45,6 +45,8 @@
#include "exec/ram_addr.h"
#endif
+#include <linux/mman.h>
+
#include "exec/cputlb.h"
#include "exec/translate-all.h"
#include "qemu/bitmap.h"
diff -uNr qemu-6.1.0/audio/ossaudio.c qemu-6.1.0.mod/audio/ossaudio.c
--- qemu-6.1.0/audio/ossaudio.c 2021-08-25 18:17:08.257953420 +0300
+++ qemu-6.1.0.mod/audio/ossaudio.c 2021-08-25 18:17:55.886330925 +0300
@@ -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-6.1.0/block/file-posix.c qemu-6.1.0.mod/block/file-posix.c
--- qemu-6.1.0/block/file-posix.c 2021-08-24 20:35:40.000000000 +0300
+++ qemu-6.1.0.mod/block/file-posix.c 2021-08-25 18:17:55.886330925 +0300
@@ -63,6 +63,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-6.1.0/hw/display/virtio-gpu-udmabuf.c qemu-6.1.0.mod/hw/display/virtio-gpu-udmabuf.c
--- qemu-6.1.0/hw/display/virtio-gpu-udmabuf.c 2021-08-24 20:35:40.000000000 +0300
+++ qemu-6.1.0.mod/hw/display/virtio-gpu-udmabuf.c 2021-08-25 18:24:11.565310557 +0300
@@ -11,6 +11,7 @@
* See the COPYING file in the top-level directory.
*/
+#include <linux/mman.h>
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "qemu-common.h"
diff -uNr qemu-6.1.0/hw/vfio/common.c qemu-6.1.0.mod/hw/vfio/common.c
--- qemu-6.1.0/hw/vfio/common.c 2021-08-24 20:35:40.000000000 +0300
+++ qemu-6.1.0.mod/hw/vfio/common.c 2021-08-25 18:17:55.886330925 +0300
@@ -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-6.1.0/hw/vfio/pci-quirks.c qemu-6.1.0.mod/hw/vfio/pci-quirks.c
--- qemu-6.1.0/hw/vfio/pci-quirks.c 2021-08-24 20:35:40.000000000 +0300
+++ qemu-6.1.0.mod/hw/vfio/pci-quirks.c 2021-08-25 18:17:55.886330925 +0300
@@ -27,6 +27,8 @@
#include "pci.h"
#include "trace.h"
+#include <linux/mman.h>
+
/*
* List of device ids/vendor ids for which to disable
* option rom loading. This avoids the guest hangs during rom
diff -uNr qemu-6.1.0/hw/virtio/vhost-user.c qemu-6.1.0.mod/hw/virtio/vhost-user.c
--- qemu-6.1.0/hw/virtio/vhost-user.c 2021-08-24 20:35:40.000000000 +0300
+++ qemu-6.1.0.mod/hw/virtio/vhost-user.c 2021-08-25 18:17:55.886330925 +0300
@@ -33,6 +33,7 @@
#include "standard-headers/linux/vhost_types.h"
#ifdef CONFIG_LINUX
+#include <linux/mman.h>
#include <linux/userfaultfd.h>
#endif
diff -uNr qemu-6.1.0/hw/virtio/vhost-vdpa.c qemu-6.1.0.mod/hw/virtio/vhost-vdpa.c
--- qemu-6.1.0/hw/virtio/vhost-vdpa.c 2021-08-24 20:35:40.000000000 +0300
+++ qemu-6.1.0.mod/hw/virtio/vhost-vdpa.c 2021-08-25 18:20:52.511731435 +0300
@@ -12,6 +12,7 @@
#include "qemu/osdep.h"
#include <linux/vhost.h>
#include <linux/vfio.h>
+#include <linux/mman.h>
#include <sys/eventfd.h>
#include <sys/ioctl.h>
#include "hw/virtio/vhost.h"
diff -uNr qemu-6.1.0/linux-user/elfload.c qemu-6.1.0.mod/linux-user/elfload.c
--- qemu-6.1.0/linux-user/elfload.c 2021-08-25 18:17:08.281953611 +0300
+++ qemu-6.1.0.mod/linux-user/elfload.c 2021-08-25 18:17:55.886330925 +0300
@@ -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-6.1.0/linux-user/flatload.c qemu-6.1.0.mod/linux-user/flatload.c
--- qemu-6.1.0/linux-user/flatload.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/linux-user/flatload.c 2021-08-25 18:17:55.886330925 +0300
@@ -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-6.1.0/linux-user/i386/cpu_loop.c qemu-6.1.0.mod/linux-user/i386/cpu_loop.c
--- qemu-6.1.0/linux-user/i386/cpu_loop.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/linux-user/i386/cpu_loop.c 2021-08-25 18:17:55.890330957 +0300
@@ -22,6 +22,8 @@
#include "qemu.h"
#include "cpu_loop-common.h"
+#include <linux/mman.h>
+
/***********************************************************/
/* CPUX86 core interface */
diff -uNr qemu-6.1.0/linux-user/mmap.c qemu-6.1.0.mod/linux-user/mmap.c
--- qemu-6.1.0/linux-user/mmap.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/linux-user/mmap.c 2021-08-25 18:17:55.890330957 +0300
@@ -21,6 +21,8 @@
#include "exec/log.h"
#include "qemu.h"
+#include <linux/mman.h>
+
static pthread_mutex_t mmap_mutex = PTHREAD_MUTEX_INITIALIZER;
static __thread int mmap_lock_count;
diff -uNr qemu-6.1.0/linux-user/syscall.c qemu-6.1.0.mod/linux-user/syscall.c
--- qemu-6.1.0/linux-user/syscall.c 2021-08-25 18:17:08.285953643 +0300
+++ qemu-6.1.0.mod/linux-user/syscall.c 2021-08-25 18:17:55.890330957 +0300
@@ -36,6 +36,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-6.1.0/migration/postcopy-ram.c qemu-6.1.0.mod/migration/postcopy-ram.c
--- qemu-6.1.0/migration/postcopy-ram.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/migration/postcopy-ram.c 2021-08-25 18:17:55.894330989 +0300
@@ -33,6 +33,8 @@
#include "hw/boards.h"
#include "exec/ramblock.h"
+#include <linux/mman.h>
+
/* Arbitrary limit on size of each discard command,
* keeps them around ~200 bytes
*/
diff -uNr qemu-6.1.0/softmmu/physmem.c qemu-6.1.0.mod/softmmu/physmem.c
--- qemu-6.1.0/softmmu/physmem.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/softmmu/physmem.c 2021-08-25 18:17:55.894330989 +0300
@@ -17,6 +17,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include <linux/mman.h>
+
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qapi/error.h"
diff -uNr qemu-6.1.0/subprojects/libvhost-user/libvhost-user.c qemu-6.1.0.mod/subprojects/libvhost-user/libvhost-user.c
--- qemu-6.1.0/subprojects/libvhost-user/libvhost-user.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/subprojects/libvhost-user/libvhost-user.c 2021-08-25 18:17:55.886330925 +0300
@@ -29,6 +29,7 @@
#include <endian.h>
#if defined(__linux__)
+#include <linux/mman.h>
#include <sys/syscall.h>
#include <fcntl.h>
#include <sys/ioctl.h>
diff -uNr qemu-6.1.0/tcg/region.c qemu-6.1.0.mod/tcg/region.c
--- qemu-6.1.0/tcg/region.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/tcg/region.c 2021-08-25 18:17:46.146253714 +0300
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
+#include <linux/mman.h>
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "qapi/error.h"
diff -uNr qemu-6.1.0/tests/vhost-user-bridge.c qemu-6.1.0.mod/tests/vhost-user-bridge.c
--- qemu-6.1.0/tests/vhost-user-bridge.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/tests/vhost-user-bridge.c 2021-08-25 18:17:55.894330989 +0300
@@ -29,6 +29,8 @@
#define _FILE_OFFSET_BITS 64
+#include <linux/mman.h>
+
#include "qemu/osdep.h"
#include "qemu/atomic.h"
#include "qemu/ctype.h"
diff -uNr qemu-6.1.0/util/memfd.c qemu-6.1.0.mod/util/memfd.c
--- qemu-6.1.0/util/memfd.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/util/memfd.c 2021-08-25 18:17:55.894330989 +0300
@@ -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-6.1.0/util/mmap-alloc.c qemu-6.1.0.mod/util/mmap-alloc.c
--- qemu-6.1.0/util/mmap-alloc.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/util/mmap-alloc.c 2021-08-25 18:17:55.894330989 +0300
@@ -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-6.1.0/util/oslib-posix.c qemu-6.1.0.mod/util/oslib-posix.c
--- qemu-6.1.0/util/oslib-posix.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/util/oslib-posix.c 2021-08-25 18:17:55.894330989 +0300
@@ -42,6 +42,7 @@
#include "qemu/compiler.h"
#ifdef CONFIG_LINUX
+#include <linux/mman.h>
#include <sys/syscall.h>
#endif
diff -uNr qemu-6.1.0/util/vfio-helpers.c qemu-6.1.0.mod/util/vfio-helpers.c
--- qemu-6.1.0/util/vfio-helpers.c 2021-08-24 20:35:41.000000000 +0300
+++ qemu-6.1.0.mod/util/vfio-helpers.c 2021-08-25 18:17:55.894330989 +0300
@@ -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"