From 401c2ec38658c7ecc2095fb7e70202387f87d6a0 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sat, 15 Aug 2020 14:10:57 -0400 Subject: work better when not targetting POSIX --- src/__main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.1