aboutsummaryrefslogtreecommitdiff
path: root/src/libeinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libeinfo.c')
-rw-r--r--src/libeinfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libeinfo.c b/src/libeinfo.c
index 8c7671da..c2ae9715 100644
--- a/src/libeinfo.c
+++ b/src/libeinfo.c
@@ -162,13 +162,13 @@ static bool colour_terminal (void)
static int get_term_columns (void)
{
-#ifdef TIOCGSIZE /* BSD */
+#if defined(TIOCGSIZE) /* BSD */
struct ttysize ts;
if (ioctl(0, TIOCGSIZE, &ts) == 0)
return (ts.ts_cols);
-#elif TIOCGWINSZ /* Linux */
- struct winsize ws;
+#elif defined(TIOCGWINSZ) /* Linux */
+ struct winsize ws;
if (ioctl(0, TIOCGWINSZ, &ws) == 0)
return (ws.ws_col);