From: Karel Zak Date: Thu, 5 Feb 2009 22:37:37 +0000 (+0100) Subject: agetty: check for termios.c_line struct member by autoconf X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30e8b186b4c6c58883486cbe27a8023848edbbdb;p=util-linux agetty: check for termios.c_line struct member by autoconf Reported-by: Robert Millan Signed-off-by: Karel Zak --- diff --git a/configure.ac b/configure.ac index 35d60e8b..13b43a36 100644 --- a/configure.ac +++ b/configure.ac @@ -396,6 +396,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ [AC_DEFINE(HAVE_TM_GMTOFF,1,[Does struct tm have a field tm_gmtoff?]) ]) +AC_CHECK_MEMBERS([struct termios.c_line],,, + [[#include ]]) + AC_CHECK_DECLS([ ADDR_NO_RANDOMIZE, FDPIC_FUNCPTRS, diff --git a/login-utils/agetty.c b/login-utils/agetty.c index 3b6de717..29ce1499 100644 --- a/login-utils/agetty.c +++ b/login-utils/agetty.c @@ -715,7 +715,7 @@ termio_init(tp, speed, op) } tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; -#ifndef __GNU__ +#ifdef HAVE_STRUCT_TERMIOS_C_LINE tp->c_line = 0; #endif tp->c_cc[VMIN] = 1;