summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_termios.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_termios.cc')
-rw-r--r--winsup/cygwin/fhandler_termios.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index 4575ede94..41e4ff7f9 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -21,6 +21,8 @@ details. */
#include "cygtls.h"
#include "ntdll.h"
+fhandler_termios *fhandler_termios::last;
+
/* Common functions shared by tty/console */
void
@@ -411,11 +413,13 @@ fhandler_termios::tcgetsid ()
}
int
-fhandler_termios::ioctl_termios (int cmd, int arg)
+fhandler_termios::ioctl (int cmd, void *varg)
{
if (cmd != TIOCSCTTY)
return 1; /* Not handled by this function */
+ int arg = (int) varg;
+
if (arg != 0 && arg != 1)
{
set_errno (EINVAL);
@@ -431,6 +435,6 @@ fhandler_termios::ioctl_termios (int cmd, int arg)
}
myself->ctty = -1;
- myself->set_ctty (tc (), 0, this);
+ myself->set_ctty (this, 0);
return 0;
}