summaryrefslogtreecommitdiff
path: root/src/nonstd/__libc_start.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nonstd/__libc_start.c')
-rw-r--r--src/nonstd/__libc_start.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nonstd/__libc_start.c b/src/nonstd/__libc_start.c
index 550eae6b..ca3e8245 100644
--- a/src/nonstd/__libc_start.c
+++ b/src/nonstd/__libc_start.c
@@ -10,7 +10,12 @@
#else
#define DEFAULT_LOCALE "C"
#include "nonstd/syscall.h"
-#define isatty(fd) __syscall(__lookup("tty"), fd)
+#include "../termios/NCCS.c"
+#include "../termios/cc_t.c"
+#include "../termios/tcflag_t.c"
+#include "../termios/struct_termios.c"
+static struct termios __tios;
+#define isatty(fd) (__syscall(__lookup("tcgetattr"), fd, &__tios) == 0)
#endif
void __libc_start(int argc, char **argv)