Re: termio constants on kfreebsd
Robert Millan <rmh@debian.org> writes:
> El 8 de gener de 2012 21:30, Christoph Egger <christoph@debian.org> ha escrit:
>> What to do with the rest? Conditionally defining all of them to 0?
>
> On my experience this works most of the time. I'd make sure that
> getty didn't break after this change, though.
Here's a patch. I'll test it and add it to the bug report or something
like that
Regards
Christoph
--- util-linux-2.20.1.orig/term-utils/agetty.c
+++ util-linux-2.20.1/term-utils/agetty.c
@@ -10,6 +10,7 @@
*
* This program is freely distributable.
*/
+
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@@ -66,6 +67,10 @@
# endif
#endif
+#ifdef __FreeBSD_kernel__
+#define USE_SYSLOG
+#endif
+
/* If USE_SYSLOG is undefined all diagnostics go to /dev/console. */
#ifdef USE_SYSLOG
# include <syslog.h>
@@ -1141,6 +1146,46 @@
/* 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);
diff -u util-linux-2.20.1/debian/rules util-linux-2.20.1/debian/rules
--- util-linux-2.20.1/debian/rules
+++ util-linux-2.20.1/debian/rules
@@ -32,9 +32,9 @@
version := $(shell sed -e '1{;s|^util-linux (\(.*\))\ .*|\1|;q;}' debian/changelog)
Upstream := $(shell sed 's/^.*(\(.*\)-.*).*/\1/; q' debian/changelog)
-CONFOPTS= --enable-raw --enable-rdev --enable-partx --with-slang
+CONFOPTS= --enable-raw --enable-rdev --with-slang
ifeq ($(DEB_HOST_ARCH_OS),linux)
-CONFOPTS += --with-selinux --enable-libmount-mount
+CONFOPTS += --with-selinux --enable-libmount-mount --enable-partx
endif
build: build-arch build-indep
--
9FED 5C6C E206 B70A 5857 70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer
Reply to: