aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2010-01-05 23:49:24 +0000
committerTiago Cunha <tcunha@gmx.com>2010-01-05 23:49:24 +0000
commit027f5310b49fd0a41669579d9e901b36998e61e2 (patch)
tree0e0d845e2b82477a9477eb6dfc170616694afe5e
parent4b2e45906256d7201bb83472b7f4e6c73dbd9248 (diff)
downloadrtmux-027f5310b49fd0a41669579d9e901b36998e61e2.tar.gz
rtmux-027f5310b49fd0a41669579d9e901b36998e61e2.tar.bz2
rtmux-027f5310b49fd0a41669579d9e901b36998e61e2.zip
Sync OpenBSD patchset 595:
Use tcflush(3) instead of TIOCFLUSH, from Ed Schouten.
-rw-r--r--tty.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/tty.c b/tty.c
index 976cfc42..cba27bc2 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.185 2009-12-26 23:50:15 tcunha Exp $ */
+/* $Id: tty.c,v 1.186 2010-01-05 23:49:24 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -147,9 +147,6 @@ tty_start_tty(struct tty *tty)
{
struct termios tio;
int mode;
-#ifdef TIOCFLUSH
- int what;
-#endif
if (tty->fd == -1)
return;
@@ -173,12 +170,7 @@ tty_start_tty(struct tty *tty)
tio.c_cc[VTIME] = 0;
if (tcsetattr(tty->fd, TCSANOW, &tio) != 0)
fatal("tcsetattr failed");
-
-#ifdef TIOCFLUSH
- what = 0;
- if (ioctl(tty->fd, TIOCFLUSH, &what) != 0)
- fatal("ioctl(TIOCFLUSH)");
-#endif
+ tcflush(tty->fd, TCIOFLUSH);
tty_putcode(tty, TTYC_SMCUP);