From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WujXV-0004xp-U8 for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:30:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WujXR-0008Qn-Rl for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:30:09 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:48600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WujXR-0008DN-Lo for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:30:05 -0400 From: Peter Maydell Date: Wed, 11 Jun 2014 15:29:42 +0100 Message-Id: <1402496993-27206-5-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1402496993-27206-1-git-send-email-peter.maydell@linaro.org> References: <1402496993-27206-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PULL 04/15] util/qemu-openpty: fix build with musl libc by include termios.h as fallback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl From: Natanael Copa 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 Reviewed-by: Paolo Bonzini Signed-off-by: Peter Maydell --- 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 # include +#else +# include #endif #ifdef __sun__ -- 1.9.2