xbps-bin: get_maxcols(): use stdin to make it work in all cases (from xdave).
This commit is contained in:
1 parent
1be90e57d7
commit
01c2dcaca7
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user