X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-svr4.c;h=02643182995039fb27d7a25516e9995b738eca03;hp=abc7d9643661421c14292f5b9b511aa0dcce8d1e;hb=9b4646bd15f16035b8ff161730b3da9df3fb4713;hpb=e8be982dbc5c6c50dfc9f66737867570c8ed4973 diff --git a/pppd/sys-svr4.c b/pppd/sys-svr4.c index abc7d96..0264318 100644 --- a/pppd/sys-svr4.c +++ b/pppd/sys-svr4.c @@ -25,9 +25,7 @@ * OR MODIFICATIONS. */ -#ifndef lint -static char rcsid[] = "$Id: sys-svr4.c,v 1.30 1999/04/12 06:24:51 paulus Exp $"; -#endif +#define RCSID "$Id: sys-svr4.c,v 1.33 1999/08/13 06:46:20 paulus Exp $" #include #include @@ -60,13 +58,17 @@ static char rcsid[] = "$Id: sys-svr4.c,v 1.30 1999/04/12 06:24:51 paulus Exp $"; #include #include #include +#ifdef SOL2 #include #include #include #include +#endif #include "pppd.h" +static const char rcsid[] = RCSID; + static int pppfd; static int fdmuxid = -1; static int ipfd; @@ -278,11 +280,14 @@ establish_ppp(fd) /* Push the async hdlc module and the compressor module. */ tty_npushed = 0; - if (ioctl(fd, I_PUSH, "ppp_ahdl") < 0) { - error("Couldn't push PPP Async HDLC module: %m"); - return -1; + + if(!sync_serial) { + if (ioctl(fd, I_PUSH, "ppp_ahdl") < 0) { + error("Couldn't push PPP Async HDLC module: %m"); + return -1; + } + ++tty_npushed; } - ++tty_npushed; if (kdebugflag & 4) { i = PPPDBG_LOG + PPPDBG_AHDLC; strioctl(pppfd, PPPIO_DEBUG, &i, sizeof(int), 0); @@ -513,7 +518,7 @@ set_up_tty(fd, local) struct termiox tiox; #endif - if (tcgetattr(fd, &tios) < 0) + if (!sync_serial && tcgetattr(fd, &tios) < 0) fatal("tcgetattr: %m"); #ifndef CRTSCTS @@ -578,7 +583,7 @@ set_up_tty(fd, local) fatal("Baud rate for %s is 0; need explicit baud rate", devnam); } - if (tcsetattr(fd, TCSAFLUSH, &tios) < 0) + if (!sync_serial && tcsetattr(fd, TCSAFLUSH, &tios) < 0) fatal("tcsetattr: %m"); #ifndef CRTSCTS @@ -1780,6 +1785,7 @@ int have_route_to(addr) u_int32_t addr; { +#ifdef SOL2 int fd, r, flags, i; struct { struct T_optmgmt_req req; @@ -1870,6 +1876,9 @@ have_route_to(addr) } close(fd); return 0; +#else + return -1; +#endif /* SOL2 */ } /*