diff options
| author | Jakob Kaivo <jkk@ung.org> | 2019-03-02 11:14:02 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2019-03-02 11:14:02 -0500 |
| commit | 1094cc8c40864c10516f44ef04458f5a2c455868 (patch) | |
| tree | bd4b2e626f7ff9443b5bd5620c632a10b654d432 /src | |
| parent | b96b1b9e2b65c0ff09889dcfec5ecec6dd4ae163 (diff) | |
correct inline definition of isatty()
Diffstat (limited to 'src')
| -rw-r--r-- | src/nonstd/__libc_start.c | 7 |
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) |
