X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2F__stdout_write.c;h=dd1ec60ff703475120251bf9a005874aafa9ae74;hb=3fe595de83e398dbc3cdbe303cacaf8485c9ae08;hp=4683ffc3b0059c2a5966144d70e0934e2a743db5;hpb=e3cd6c5c265cd481db6e0c5b529855d99f0bda30;p=musl diff --git a/src/stdio/__stdout_write.c b/src/stdio/__stdout_write.c index 4683ffc3..dd1ec60f 100644 --- a/src/stdio/__stdout_write.c +++ b/src/stdio/__stdout_write.c @@ -1,10 +1,11 @@ #include "stdio_impl.h" +#include 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); }