summaryrefslogtreecommitdiffstats
path: root/lib/libcurses
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1995-03-28 22:20:19 +0000
committerdfr <dfr@FreeBSD.org>1995-03-28 22:20:19 +0000
commit1b9498b875b3a0c7f978d6bc227904216db04456 (patch)
tree7c47db1a421f7dc95d1dfbddf69d8b7edc710eab /lib/libcurses
parent6b6e05e3ff89b60013b172770d2c3dd8b6becd11 (diff)
downloadFreeBSD-src-1b9498b875b3a0c7f978d6bc227904216db04456.zip
FreeBSD-src-1b9498b875b3a0c7f978d6bc227904216db04456.tar.gz
Use __tty_fileno instead of STDERR_FILENO when detecting window size
changes Reviewed by: Bob Willcox <bob@obiwan.pmr.com>
Diffstat (limited to 'lib/libcurses')
-rw-r--r--lib/libcurses/setterm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libcurses/setterm.c b/lib/libcurses/setterm.c
index ddb5871..2c2e36e 100644
--- a/lib/libcurses/setterm.c
+++ b/lib/libcurses/setterm.c
@@ -109,7 +109,7 @@ setterm(type)
#endif
/* Try TIOCGWINSZ, and, if it fails, the termcap entry. */
- if (ioctl(STDERR_FILENO, TIOCGWINSZ, &win) != -1 &&
+ if (ioctl(__tty_fileno, TIOCGWINSZ, &win) != -1 &&
win.ws_row != 0 && win.ws_col != 0) {
LINES = win.ws_row;
COLS = win.ws_col;
OpenPOWER on IntegriCloud