summaryrefslogtreecommitdiffstats
path: root/include/ttyutils.h
diff options
context:
space:
mode:
authorChristoph Egger2014-08-24 18:04:43 +0200
committerKarel Zak2014-09-17 10:14:50 +0200
commitc32270d41f3cf8f3d03f2418180e72c99e13a389 (patch)
treea523e54edacc6884165c4ad298e4c65467865f2f /include/ttyutils.h
parentipcs: remaining kFreeBSD hackery for building. (diff)
downloadkernel-qcow2-util-linux-c32270d41f3cf8f3d03f2418180e72c99e13a389.tar.gz
kernel-qcow2-util-linux-c32270d41f3cf8f3d03f2418180e72c99e13a389.tar.xz
kernel-qcow2-util-linux-c32270d41f3cf8f3d03f2418180e72c99e13a389.zip
agetty: fixing FTBFS on !linux (Debian util-linux 2.20.1-1.2)
Handle vc flags missing on FreeBSD Fix tty creation on kFreeBSD taking patch from 2.19 Addresses-Debian-Bug: #650185
Diffstat (limited to 'include/ttyutils.h')
-rw-r--r--include/ttyutils.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/ttyutils.h b/include/ttyutils.h
index 4f2fd8848..e842f9f0d 100644
--- a/include/ttyutils.h
+++ b/include/ttyutils.h
@@ -74,6 +74,46 @@ static inline void reset_virtual_console(struct termios *tp, int flags)
/* Sane setting, allow eight bit characters, no carriage return delay
* the same result as `stty sane cr0 pass8'
*/
+#ifndef IUCLC
+# define IUCLC 0
+#endif
+#ifndef NL0
+# define NL0 0
+#endif
+#ifndef CR0
+# define CR0 0
+#endif
+#ifndef BS0
+# define BS0 0
+#endif
+#ifndef VT0
+# define VT0 0
+#endif
+#ifndef FF0
+# define FF0 0
+#endif
+#ifndef OLCUC
+# define OLCUC 0
+#endif
+#ifndef OFILL
+# define OFILL 0
+#endif
+#ifndef NLDLY
+# define NLDLY 0
+#endif
+#ifndef CRDLY
+# define CRDLY 0
+#endif
+#ifndef BSDLY
+# define BSDLY 0
+#endif
+#ifndef VTDLY
+# define VTDLY 0
+#endif
+#ifndef FFDLY
+# define FFDLY 0
+#endif
+
tp->c_iflag |= (BRKINT | ICRNL | IMAXBEL);
tp->c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | ISTRIP);
tp->c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0);