blkid: Fix portability issue if TIOCGSIZE and TIOCGWINSZ are present
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
diff --git a/misc/blkid.c b/misc/blkid.c
index d64f4ce..c7679ad 100644
--- a/misc/blkid.c
+++ b/misc/blkid.c
@@ -93,20 +93,20 @@
static int get_terminal_width(void)
{
#ifdef TIOCGSIZE
- struct ttysize win;
+ struct ttysize t_win;
#endif
#ifdef TIOCGWINSZ
- struct winsize win;
+ struct winsize w_win;
#endif
const char *cp;
#ifdef TIOCGSIZE
- if (ioctl (0, TIOCGSIZE, &win) == 0)
- return (win.ts_cols);
+ if (ioctl (0, TIOCGSIZE, &t_win) == 0)
+ return (t_win.ts_cols);
#endif
#ifdef TIOCGWINSZ
- if (ioctl (0, TIOCGWINSZ, &win) == 0)
- return (win.ws_col);
+ if (ioctl (0, TIOCGWINSZ, &w_win) == 0)
+ return (w_win.ws_col);
#endif
cp = getenv("COLUMNS");
if (cp)