diff options
| author | Jakob Kaivo <jkk@ung.org> | 2020-08-15 14:10:57 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2020-08-15 14:10:57 -0400 |
| commit | 401c2ec38658c7ecc2095fb7e70202387f87d6a0 (patch) | |
| tree | d772231590664601defeef92e7e251fd53275208 | |
| parent | 514ff5558483bb7f7cc13e24720ebd5bdf2b9cdf (diff) | |
work better when not targetting POSIX
| -rw-r--r-- | src/__main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/__main.c b/src/__main.c index bce4eef0..675a4b46 100644 --- a/src/__main.c +++ b/src/__main.c @@ -11,11 +11,12 @@ #define DEFAULT_LOCALE "C" #include "_syscall.h" #include "termios/NCCS.c" +#include "termios/speed_t.c" #include "termios/cc_t.c" #include "termios/tcflag_t.c" #include "termios/struct_termios.c" -static struct termios __tios; -#define isatty(fd) (__syscall(__syscall_lookup(tcgetattr), fd, &__tios) == 0) +#include "termios/_termios.h" +#define isatty(fd) ioctl(fd, TCFLSH, 0) #endif void __main(int argc, char **argv) |
