1 #include <termios.h> 2 #include <sys/ioctl.h> 3 #include "syscall.h" 4 tcgetwinsize(int fd,struct winsize * wsz)5 int tcgetwinsize(int fd, struct winsize *wsz) 6 { 7 return syscall(SYS_ioctl, fd, TIOCGWINSZ, wsz); 8 } 9