X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsys-linux.c;h=8d6eee93550622d5cbe0b9803fe714c11d65b713;hb=75f1f5fde9fa6a64d0c35af6dfac5086a0739334;hp=c05047c765c1d6cad5e1cf38ce9897850d8a9658;hpb=d65f6713c8514b016629b87d44d5154d70776f7b;p=ppp.git diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index c05047c..8d6eee9 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -69,6 +69,10 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -85,7 +89,9 @@ #include #include #include +#ifdef HAVE_UTMP_H #include +#endif #include #include #include @@ -1058,6 +1064,7 @@ void set_up_tty(int tty_fd, int local) while (tcsetattr(tty_fd, TCSAFLUSH, &tios) < 0 && !ok_error(errno)) if (errno != EINTR) fatal("tcsetattr: %m (line %d)", __LINE__); + restore_term = 1; /* Most Linux architectures and drivers support arbitrary baud rate values via BOTHER */ #ifdef TCGETS2 @@ -1091,8 +1098,6 @@ void set_up_tty(int tty_fd, int local) else fatal("Baud rate for %s is 0; need explicit baud rate", devnam); } - - restore_term = 1; } /********************************************************************