From 11da9c6b1ef77a7bf16855bab9ef09b5f646ab9b Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 16 Apr 2017 14:18:29 +0200 Subject: [PATCH] Don't try to use TIOCGWINSZ if termios.h is not available. --- src/ui/terminal/terminal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/terminal/terminal.c b/src/ui/terminal/terminal.c index bc47e3c844..c8a605d8f2 100644 --- a/src/ui/terminal/terminal.c +++ b/src/ui/terminal/terminal.c @@ -48,6 +48,7 @@ terminal_check_size (void) int view_width = 0; int view_length = 0; +#ifdef HAVE_TERMIOS_H struct winsize ws; if (0 == ioctl (0, TIOCGWINSZ, &ws)) { @@ -55,6 +56,7 @@ terminal_check_size (void) view_length = ws.ws_row; } else +#endif { if (view_width <= 0 && getenv ("COLUMNS") != NULL) view_width = atoi (getenv ("COLUMNS")); -- 2.30.2