#include #include #include "syscall.h" int tcgetwinsize(int fd, struct winsize *wsz) { return syscall(SYS_ioctl, fd, TIOCGWINSZ, wsz); }