summaryrefslogtreecommitdiffstats
path: root/main/xen/qemu-xen-musl-openpty.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-10-09 12:04:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-10-09 12:17:58 +0000
commitd7fcf5542a0a6ab8f821862a9cc050db36c8c2e9 (patch)
tree903af9a6ebff1a12405322e7e2a62e57f7f6425f /main/xen/qemu-xen-musl-openpty.patch
parent0ffb8fd99cbb3535ad5469c4bf17b624c2461dbc (diff)
downloadaports-d7fcf5542a0a6ab8f821862a9cc050db36c8c2e9.tar.bz2
aports-d7fcf5542a0a6ab8f821862a9cc050db36c8c2e9.tar.xz
main/xen: upgrade to 4.4.1 and remove xend
fixes #3228
Diffstat (limited to 'main/xen/qemu-xen-musl-openpty.patch')
-rw-r--r--main/xen/qemu-xen-musl-openpty.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/main/xen/qemu-xen-musl-openpty.patch b/main/xen/qemu-xen-musl-openpty.patch
new file mode 100644
index 000000000..bb2381055
--- /dev/null
+++ b/main/xen/qemu-xen-musl-openpty.patch
@@ -0,0 +1,42 @@
+From 828ca41769f5070bec903db348647a47d2e0515e Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 29 Apr 2014 10:14:57 +0200
+Subject: [PATCH] util/qemu-openpty: fix build with musl libc by include
+ termios.h as fallback
+
+Include termios.h as POSIX fallback when not glibc, bsd or solaris.
+POSIX says that termios.h should define struct termios and TCAFLUSH.
+http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html
+
+This fixes the following compile errors with musl libc:
+
+util/qemu-openpty.c: In function 'qemu_openpty_raw':
+util/qemu-openpty.c:112:20: error: storage size of 'tty' isn't known
+ struct termios tty;
+ ^
+...
+util/qemu-openpty.c:128:24: error: 'TCSAFLUSH' undeclared (first use in this function)
+ tcsetattr(*aslave, TCSAFLUSH, &tty);
+ ^
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ util/qemu-openpty.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/util/qemu-openpty.c b/util/qemu-openpty.c
+index 4febfe9..4c53211 100644
+--- a/tools/qemu-xen/util/qemu-openpty.c
++++ b/tools/qemu-xen/util/qemu-openpty.c
+@@ -47,6 +47,8 @@
+ #elif defined CONFIG_SOLARIS
+ # include <termios.h>
+ # include <stropts.h>
++#else
++# include <termios.h>
+ #endif
+
+ #ifdef __sun__
+--
+2.1.2
+