mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Use __tty_fileno instead of STDERR_FILENO when detecting window size
changes Reviewed by: Bob Willcox <bob@obiwan.pmr.com>
This commit is contained in:
parent
d23c175f9d
commit
db0770545f
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue