]> err.no Git - util-linux/commitdiff
agetty: check for termios.c_line struct member by autoconf
authorKarel Zak <kzak@redhat.com>
Thu, 5 Feb 2009 22:37:37 +0000 (23:37 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 5 Feb 2009 22:37:37 +0000 (23:37 +0100)
Reported-by: Robert Millan <rmh@aybabtu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
login-utils/agetty.c

index 35d60e8b5849aa804f620c41c537c8badcf1f8e7..13b43a364fb38310cb43c5326f02f0d8db3e3c63 100644 (file)
@@ -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 <termios.h>]])
+
 AC_CHECK_DECLS([
  ADDR_NO_RANDOMIZE,
  FDPIC_FUNCPTRS,
index 3b6de7178656f014fe10b6b2779a4b42b8e9de77..29ce149909fffbc7ad7cb2015a3d205d1f6a896a 100644 (file)
@@ -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;