[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/15] util/qemu-openpty: fix build with musl libc by
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 04/15] util/qemu-openpty: fix build with musl libc by include termios.h as fallback |
Date: |
Wed, 11 Jun 2014 15:29:42 +0100 |
From: Natanael Copa <address@hidden>
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 <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
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/util/qemu-openpty.c
+++ b/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__
--
1.9.2
- [Qemu-devel] [PULL 13/15] bsd-user: Implement strace support for extattr_* syscalls, (continued)
- [Qemu-devel] [PULL 13/15] bsd-user: Implement strace support for extattr_* syscalls, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 11/15] bsd-user: Implement strace support for print_ioctl syscall, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 10/15] bsd-user: Implement strace support for print_sysctl syscall, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 07/15] exec: replace ffsl with ctzl, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 02/15] util/hbitmap.c: Use ctpopl rather than reimplementing a local equivalent, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 09/15] bsd-user: GPL v2 attribution update and style, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 08/15] bsd-user: add HOST_VARIANT_DIR for various *BSD dependent code, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 06/15] vhost: replace ffsl with ctzl, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 03/15] bsd-user/mmap.c: Don't try to override g_malloc/g_free, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 01/15] bsd-user: refresh freebsd system call numbers, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 04/15] util/qemu-openpty: fix build with musl libc by include termios.h as fallback,
Peter Maydell <=
- [Qemu-devel] [PULL 12/15] bsd-user: Implement strace support for __acl_* syscalls, Peter Maydell, 2014/06/11
- [Qemu-devel] [PULL 05/15] xen: replace ffsl with ctzl, Peter Maydell, 2014/06/11
- Re: [Qemu-devel] [PULL 00/15] bsd-user queue, Peter Maydell, 2014/06/11