From f5e65274f0f150d6db9f53f87e87eb6d984f8e94 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 17 Apr 2007 12:21:15 +0000 Subject: fix #if handling in get_term_columns --- src/libeinfo.c | 6 +++--- 1 file 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); -- cgit v1.2.3