#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 <linux/termios.h>
+#else
+
#ifdef HAVE_TERMIO_H
#include <termio.h>
#endif /* HAVE_TERMIO_H */
#include <termios.h>
+#endif
#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h>
#define TCSETS TIOCSETA
#define TCSETSW TIOCSETAW
#define TCSETSF TIOCSETAF
-#endif
+#endif
struct winsize ws;
#ifdef TIOCGSIZE
struct ttysize ts;
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???");
printxval(baud_options, tios.c_ospeed, "B???");
tprintf(" (out)");
}
-#endif
+#endif
tprintf(" %sopost %sisig %sicanon %secho ...}",
(tios.c_oflag & OPOST) ? "" : "-",
(tios.c_lflag & ISIG) ? "" : "-",
return 0;
}
}
-