diff options
Diffstat (limited to 'src/stdio/__stdout_write.c')
-rw-r--r-- | src/stdio/__stdout_write.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/stdio/__stdout_write.c b/src/stdio/__stdout_write.c index 200fe2c9..dd1ec60f 100644 --- a/src/stdio/__stdout_write.c +++ b/src/stdio/__stdout_write.c @@ -1,12 +1,11 @@ #include "stdio_impl.h" -#include <termios.h> #include <sys/ioctl.h> size_t __stdout_write(FILE *f, const unsigned char *buf, size_t len) { - struct termios tio; + struct winsize wsz; f->write = __stdio_write; - if (!(f->flags & F_SVB) && __syscall(SYS_ioctl, f->fd, TCGETS, &tio)) + if (!(f->flags & F_SVB) && __syscall(SYS_ioctl, f->fd, TIOCGWINSZ, &wsz)) f->lbf = -1; return __stdio_write(f, buf, len); } |