]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sulogin: couple of obvious fixes for non-linux systems
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 22 Mar 2013 13:41:47 +0000 (14:41 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 26 Mar 2013 09:54:10 +0000 (10:54 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/sulogin.c

index db5f41e2b3b5fb603b96daf6001b4e9bef086363..621df1e4fcf88b53f02af2d577c49cbcad690c12 100644 (file)
@@ -118,7 +118,9 @@ static void tcinit(struct console *con)
                cfsetispeed(tio, ispeed);
                cfsetospeed(tio, ospeed);
 
+#ifdef HAVE_STRUCT_TERMIOS_C_LINE
                tio->c_line         = 0;
+#endif
                tio->c_cc[VTIME]    = 0;
                tio->c_cc[VMIN]     = 1;
 
@@ -198,7 +200,7 @@ static void tcfinal(struct console *con)
        tio->c_cc[VEOF]     = CEOF;
 #ifdef VSWTC
        tio->c_cc[VSWTC]    = _POSIX_VDISABLE;
-#else
+#elif defined(VSWTCH)
        tio->c_cc[VSWTCH]   = _POSIX_VDISABLE;
 #endif
        tio->c_cc[VSTART]   = CSTART;