summaryrefslogtreecommitdiffhomepage
path: root/patches/qemu-3.1.0.local.patch
blob: 47b88552d08b18bf9ac08ed4e50b48008d34eeb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
diff -ru qemu-3.1.0.orig/block/file-posix.c qemu-3.1.0/block/file-posix.c
--- qemu-3.1.0.orig/block/file-posix.c	2018-12-11 18:44:34.000000000 +0100
+++ qemu-3.1.0/block/file-posix.c	2019-01-26 16:56:01.445730665 +0100
@@ -68,6 +68,9 @@
 #ifdef __s390__
 #include <asm/dasd.h>
 #endif
+#ifdef __midipix__
+#include <sys/ioctl.h>
+#endif
 #ifndef FS_NOCOW_FL
 #define FS_NOCOW_FL                     0x00800000 /* Do not cow file */
 #endif
diff -ru qemu-3.1.0.orig/configure qemu-3.1.0/configure
--- qemu-3.1.0.orig/configure	2018-12-11 18:44:34.000000000 +0100
+++ qemu-3.1.0/configure	2019-01-26 17:14:57.534041555 +0100
@@ -631,6 +631,8 @@
 
 if check_define __linux__ ; then
   targetos="Linux"
+elif check_define __midipix__ ; then
+  targetos='Midipix'
 elif check_define _WIN32 ; then
   targetos='MINGW32'
 elif check_define __OpenBSD__ ; then
@@ -882,6 +884,10 @@
   supported_os="yes"
   libudev="yes"
 ;;
+Midipix)
+  midipix="yes"
+  supported_os="yes"
+;;
 esac
 
 if [ "$bsd" = "yes" ] ; then
@@ -4361,7 +4367,7 @@
 }
 EOF
 if compile_prog "" "" ; then
-  epoll=yes
+  epoll=no
 fi
 
 # epoll_create1 is a later addition
@@ -4384,7 +4390,7 @@
 }
 EOF
 if compile_prog "" "" ; then
-  epoll_create1=yes
+  epoll_create1=no
 fi
 
 # check for sendfile support
@@ -5254,7 +5260,7 @@
 
 vector16=no
 if compile_prog "" "" ; then
-  vector16=yes
+  vector16=no
 fi
 
 ########################################
diff -ru qemu-3.1.0.orig/util/oslib-posix.c qemu-3.1.0/util/oslib-posix.c
--- qemu-3.1.0.orig/util/oslib-posix.c	2018-12-11 18:44:35.000000000 +0100
+++ qemu-3.1.0/util/oslib-posix.c	2019-01-26 17:06:42.283833497 +0100
@@ -43,6 +43,10 @@
 #include <sys/syscall.h>
 #endif
 
+#ifdef __midipix__
+#include <sys/syscall.h>
+#endif
+
 #ifdef __FreeBSD__
 #include <sys/sysctl.h>
 #include <sys/user.h>
@@ -76,7 +80,7 @@
 
 int qemu_get_thread_id(void)
 {
-#if defined(__linux__)
+#if defined(__linux__) || defined(__midipix__)
     return syscall(SYS_gettid);
 #else
     return getpid();
diff -ru qemu-3.1.0.orig/util/qemu-openpty.c qemu-3.1.0/util/qemu-openpty.c
--- qemu-3.1.0.orig/util/qemu-openpty.c	2018-12-11 18:44:35.000000000 +0100
+++ qemu-3.1.0/util/qemu-openpty.c	2019-01-26 17:07:10.487735991 +0100
@@ -35,7 +35,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 
-#if defined(__GLIBC__)
+#if defined(__GLIBC__) || defined(__midipix__)
 # include <pty.h>
 #elif defined CONFIG_BSD
 # include <termios.h>