From c32270d41f3cf8f3d03f2418180e72c99e13a389 Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Sun, 24 Aug 2014 18:04:43 +0200 Subject: 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 --- include/ttyutils.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'include/ttyutils.h') 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); -- cgit v1.2.3-55-g7522