From: Roland McGrath Date: Tue, 14 Jan 2003 07:53:40 +0000 (+0000) Subject: 2003-01-13 Roland McGrath X-Git-Tag: v4.5.18~865 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e87ee0d5c9459d3c6c14050c6a59cba54ae8d45;p=strace 2003-01-13 Roland McGrath * term.c [LINUX]: Get kernel definition of struct termios. From Anton Blanchard . --- diff --git a/term.c b/term.c index 0a741d54..5fad3b52 100644 --- a/term.c +++ b/term.c @@ -29,11 +29,20 @@ #include "defs.h" +#ifdef LINUX +/* + * The C library's definition of struct termios might differ from + * the kernel one, and we need to use the kernel layout. + */ +#include +#else + #ifdef HAVE_TERMIO_H #include #endif /* HAVE_TERMIO_H */ #include +#endif #ifdef HAVE_SYS_FILIO_H #include @@ -182,7 +191,7 @@ long code, arg; #define TCSETS TIOCSETA #define TCSETSW TIOCSETAW #define TCSETSF TIOCSETAF -#endif +#endif struct winsize ws; #ifdef TIOCGSIZE struct ttysize ts; @@ -207,7 +216,7 @@ long code, arg; return 0; if (abbrev(tcp)) { tprintf(", {"); -#ifndef FREEBSD +#ifndef FREEBSD printxval(baud_options, tios.c_cflag & CBAUD, "B???"); #else printxval(baud_options, tios.c_ispeed, "B???"); @@ -216,7 +225,7 @@ long code, arg; printxval(baud_options, tios.c_ospeed, "B???"); tprintf(" (out)"); } -#endif +#endif tprintf(" %sopost %sisig %sicanon %secho ...}", (tios.c_oflag & OPOST) ? "" : "-", (tios.c_lflag & ISIG) ? "" : "-", @@ -451,4 +460,3 @@ long code, arg; return 0; } } -