getopt.h is a GNU-getopt-specific header. always expose GNU functions.
[musl] / src / unistd / isatty.c
1 #include <unistd.h>
2 #include <termios.h>
3
4 int isatty(int fd)
5 {
6         struct termios t;
7         return tcgetattr(fd, &t) == 0;
8 }