xbps-bin: get_maxcols(): use stdin to make it work in all cases (from xdave).
This commit is contained in:
parent
1be90e57d7
commit
01c2dcaca7
@ -221,7 +221,7 @@ get_maxcols(void)
|
||||
{
|
||||
struct winsize ws;
|
||||
|
||||
if (ioctl(1, TIOCGWINSZ, &ws) == 0)
|
||||
if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) == 0)
|
||||
return ws.ws_col;
|
||||
|
||||
return 80;
|
||||
|
Loading…
Reference in New Issue
Block a user