summaryrefslogtreecommitdiff
path: root/login/openpty.c
diff options
context:
space:
mode:
Diffstat (limited to 'login/openpty.c')
-rw-r--r--login/openpty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/login/openpty.c b/login/openpty.c
index ad02f6f5ac..c3cef7cf87 100644
--- a/login/openpty.c
+++ b/login/openpty.c
@@ -117,10 +117,12 @@ openpty (int *amaster, int *aslave, char *name,
}
/* XXX Should we ignore errors here? */
- if(termp)
+ if (termp)
tcsetattr (slave, TCSAFLUSH, termp);
+#ifdef TIOCSWINSZ
if (winp)
ioctl (slave, TIOCSWINSZ, winp);
+#endif
*amaster = master;
*aslave = slave;