summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-15 14:10:57 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-15 14:10:57 -0400
commit401c2ec38658c7ecc2095fb7e70202387f87d6a0 (patch)
treed772231590664601defeef92e7e251fd53275208 /src
parent514ff5558483bb7f7cc13e24720ebd5bdf2b9cdf (diff)
work better when not targetting POSIX
Diffstat (limited to 'src')
-rw-r--r--src/__main.c5
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)